1

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

1

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";
      this.Controls.Add(presenterListMenu);
      oGrid.Columns.Add(colMenu);

Source

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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