SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

is there a way how to obtain the default list of custom actions in ECB ? I tried list.UserCustomActions but it returns only custom actions added by user. In my case it returned 0. I would like to obtain custom actions like Edit, View CustomAction objects. I using SPGridView and I would like to make o copy of them because the data come from search engine. I would like to this look close to list view. It is possible? Thanks

share|improve this question

If I understood you properly, you want ECB for your list, if yes then you don't need to copy default ones but just this code to create a new ECB column and add it to SPGridView,

      SPMenuField colMenu = new SPMenuField();
      colMenu.HeaderText = "Presenter Name";
      colMenu.TextFields = "PresenterName";
      colMenu.MenuTemplateId = "PresenterListMenu";
      colMenu.NavigateUrlFields = "ID,PresenterName";
      colMenu.NavigateUrlFormat = "do.aspx?p={0}&q={1}";
      colMenu.TokenNameAndValueFields = "EDIT=ID,NAME=PresenterName";
      colMenu.SortExpression = "PresenterName";


Don't think you can get default ones, you might need to re-create them, here's the tutorial.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.