Dynamic EditControlBlock menu items

As a SharePoint developer, you often have to struggle with certain platform limitations. One of those limitation is the fact that the EditControlBlock (The list item contextual drop down menu) does not support menu items display based on server sided conditions.  For example, you cannot do something like say: only display this menu when the document has a metadata value of “approved” in a specific column.

As a SharePoint product developer, this is a major problem since we have, to date, 11 products that sit on top of SharePoint some of which use this contextual menu in order to display available features to the end-user.

Let’s  take as an example render-It, a document transformation product that allows documents like doc or docx documents to be transformed in another format like pdf, html etc… Everyone will agree that this “rendering” menu item should not be displayed unless the current document meets the requirements for the transformation.  Some people on the web have taken an approach where they modify or override the core.js functions and add their own logic. This was not an option for us since we wanted a “non-intrusive” way of adding our logic to existing functions.

So instead, we used the reflective nature of the JavaScript language to “hook” up to existing core.js functions and modify their parameters in order to add our own menus at run time by making some ajax calls. This preserves the original core.js functions and prevents bugs due to possible upgrades or changes Microsoft might implement in the core.js.

This nifty little trick allows us to make an Ajax call to the server at run-time in order to validate if a specific menu item should be displayed for this specific item in this specific context. It makes the end-user experience much more enjoyable by not having 5-6 menu items that will give you an handled error message after you click on it like ‘this action is not valid for this item”  which is very unpleasant.

The result is a much more intuitive editcontrolblock menu with menu items available only when specific feature requirements are met by the current item, security, type, metadata etc….

5 Responses to “Dynamic EditControlBlock menu items”

  • I think It’s absolutely an alarming gadget to get in my arsenal. Does somebody have aopinion where I can buy it? Any suggestions?

  • Unfortunately this is an internal module to our product platform Alexya. This is a feature you get when you have 1 or more Alexya modules installed on your SharePoint server and cannot be bought separately.

  • http://rel” rel=”nofollow”> Спасибо,…

    Хотя новость уже читал…

  • http://rel” rel=”nofollow”>Даже не знаю…

    Ссылки как то странно отображаются…

  • Medicamentspot.com International Legal RX Medications. Special Internet Prices (up to 40% off average US price). NO PRIOR PRESCRIPTION REQUIRED!…

    Combivir@buy.online” rel=”nofollow”>.…

Leave a Reply

Calendar
September 2010
M T W T F S S
« Mar    
 12345
6789101112
13141516171819
20212223242526
27282930  
  • Change management! The real challenge in your SharePoint implementation March 10, 2010
    I have been involved in implementing content management technology since 1993. SharePoint has rapidly democratized electronic document management, collaboration, web content management, portal and many other content technology. It is impressive to see the number of blog, website and conference that are focusing on the SharePoint technology. But the reality i […]
    Danny Boulanger
  • Relationship management in SharePoint February 7, 2010
    One of the most lacking feature in SharePoint 2007 is the ability to create relations between lists and items in lists. We have thought long and hard about how to implement this functionality in SharePoint while leaving as small a footprint as possible. Our first implementation of this functionality was bundled in a product called Sopra [...] […]
    Louis-Philippe Meunier
  • New release: Extranet in-a-box module for Alexya February 1, 2010
    We are delight to show you our Extranet in-a-box module latest version.  In this video you will be able to see not only the Extranet module in action, but also working in relationship with the Extensible Relationship Management and content transformation module.  We have build our Extranet with various Alexya’s module to support our business needs: [...] […]
    Danny Boulanger
  • Dynamic EditControlBlock menu items November 9, 2009
    As a SharePoint developer, you often have to struggle with certain platform limitations. One of those limitation is the fact that the EditControlBlock (The list item contextual drop down menu) does not support menu items display based on server sided conditions.  For example, you cannot do something like say: only display this menu when the [...] […]
    Louis-Philippe Meunier
  • If you are in Boston December 1st-3rd come visit us at… October 13, 2009
    Alcero will be participating @ The Gildane Conference in Boston, MA  from December 1st-3rd 2009.  If you happen to be in Boston during these dates we invite you to come and visit us as we will be demonstrating some of our new products such as Reperio, Findability for SharePoint and Sudo, Workflow in a Box for [...] […]
    Danny Boulanger