Please provide suggestions for these questions:
1. I am using SPMenuField in spgridivew which uses a MenuTemplate to show context menu items.
Problem is, if MenuTemplate does not have any items in it then the SPMenuField shows the column but text/menu for this column in the rows dissapears.
Right now I have solved this by using empty menu item like this MenuItemTemplate testMenu = new MenuItemTemplate("", ""). Is there any other way to solve this.
2. I require a default action for SPMenuField item just like sharepoint. NavigateURLFormat property allows to redirect to a link. Is there a way to call javascript in NavigateURLFormat property.
3. I use a TemplateField in spgridivew. TemplateField dissapears during postback. Right now I have solved this by adding TemplateField to spgridview during Page_SaveStateComplete event of the page as suggested in this link http://connect.microsoft.com/VisualStudio/feedback/details/104994/templatefield-in-a-gridview-doesnt-have-its-viewstate-restored-when-boundfields-are-inserted
. But it is difficult to manage in this event. Is there a way to solve this problem and make templatefield work like other fields.
Note: Along with TemplateField I use BoundField, SPMenuField which work fine during postbacks.
4. Using SPMenuField shows same menu items for all the rows in the grid. Is there a way to show context sensitive menu for SPGridView which has to be like ECB menu and to have unique menu items for each row.