One of the things that we’ve often wanted to do in SharePoint 2010 is to not have to have the Edit Control Block or ECB attached to the Title field, if you’re not sure what the ECB is, it’s that drop down menu on the standard List View page.  For instance, recently I wanted it attached to a field called JobId.

In SharePoint 2007, this was a bit of a fag to change, I’ve seen various blog posts about it, but never found a reliable method.  Now it’s pretty simple. You can do it through SharePoint Designer 2010 very easily, but if you want to build a custom list template with everything already configured it’s also simple. But it’s not well advertised!!  So this took me about 2-3 days to track down, and I hope that me putting this up here will save you a bunch of time.

In your List Definition Schema.xml, identify the field you want to attach the ECB to and add in the following attribute:

ListItemMenu=”TRUE”

Here’s a screenshot of a List Template Schema for you.

image

And here’s the result:

image

Hope that helps somebody

Cheers

Dave Mc

5 responses

  1. Many thanks mate .
    Very true ‘But it’s not well advertised’ . Thanks for bring this up here.
    Saved me a lot of time and frustration.

  2. Nice article davemcmahon81, it helped me. But in my case by some reasons my defined Custom Actions did not appear in this context menu. Have you tried your solution together with defined Custom Action?

    1. Agreed you can do it in SPD, but the solution I was building was within Visual Studio for a redeployable WSP. Thanks for the link though, appreciated.

Leave a reply to SharePoint 2010: Recopilatorio de enlaces interesantes (XVI)! « Pasión por la tecnología… Cancel reply

The Blog

Dave Mc muses about history, travel, writing, coaching, astronomy, technology and life, family and the world around us. You may agree with his opinions, you may not, that’s life …