Jul28Written by: Bruce Dishongh
7/28/2009 6:46 PM 
If you have been watching our progress on our
What's New Web Part then you already know we are steadily improving the product with each new release. This week we will release our most recent updates, which include those familiar Windows SharePoint Services style Context Menus. We have spent a considerable amount of time adding Context Menus to the web part, and it has been quite a learning experience. Typically, the default Context Menus in Windows SharePoint Services are generated for a single List, and only specific menu items are Enabled/Disabled based on each individual List item displayed. This model simply doesn't work for our
What's New Web Part, as it displays List items from multiple Lists at the same time. In the sample screenshots below notice how the Context Menu changes for each individual List item based on its Content Type.
Context Menu for Document Content Type:
|
 |
So how did we do it? SPMenuField perhaps? Well we plan to show you over several posts, because it simply cannot be covered in a single post. We all know Windows SharePoint Services has its quirks, well getting Context Menus to work brought more of these quirks out than we wanted to find. Nevertheless, they are complete and all we have left is some additional testing and packaging. Expect a release by the end of this week and available for download from the web site.
Context Menu for Announcement Content Type:
|
|
|
The next release will be
2009.3.03 and will be free to all existing customers. The
2009.3.03 update will only run with a
Farm license! If you haven't updated your
Site Collection or
Web Application licenses yet...now would be a very good time. Remember these license updates are free. Contact us at
Sales@bWareTech.com for assistance.
Context Menu for Document Content Type:
|
|
|
This update was a result of customer feedback. Have an idea or feature request of your own? Please let us know.
Technorati Tags:
SharePoint,
WSS 3.0,
MOSS 2007,
WebPart,
Web Part5 comment(s) so far...
So did you use SPMenuField to do this? Where did you put the menu code...RowCreated event? By Rich on
8/16/2009 11:46 AM
|
Rich,
I intend to write a few blog posts on the subject. I was out on vacation this past week, so look for the first post sometime this week. I did not use the SPMenuField class, nor did I use the RowCreated event of the SPGridView class. I created a custom property that extends the TemplateField class which is used as one of the SPGridView columns. I then used a custom template class which implements the ITemplate interface. The custom template class generates the necessary markup in the DataBound event on a row by row basis. By Bruce Dishongh on
8/16/2009 1:12 PM
|
Could you send me the code? By Kamal on
8/20/2009 5:38 AM
|
Are you going to post on this soon? I downloaded the web part just to see it in action--crap it works! I need to be able to do this in a Task web part I am working on--this would great. Thanks. By spdude on
9/1/2009 6:24 PM
|
spdude,
I plan to write a few posts on the subject. I have just been very busy finishing up our next 2 products. Soon...real soon. By Bruce Dishongh on
9/2/2009 5:35 PM
|