I have made my own rightclick menu for selecting which headers has to be shown and which doesn't. I have done this by code above:
I get my menu as expected but my problem is then that it not is possible to select more than one item. When I select an item, all other items are getting deselected.
I'm aware that the exist an EnableHeaderContextMenu for the grid, but I'm not interested in the sorting and grouping functionality in this menu (sorting should only be done by click at the header), and I want to execute some serverside code, when select and deselecting columns - and not letting the grid do the column-hiding.
Best regards,
Kenneth
<telerik:RadContextMenu ID="RadGrid1ContextMenu" runat="server" |
OnClientItemClicked="RadGrid1ContextMenu_ClientItemClicked"> |
<Targets> |
<telerik:ContextMenuControlTarget ControlID="RadGrid1" /> |
</Targets> |
<Items> |
<telerik:RadMenuItem Text="Status" Value="Status" |
ImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box-uncheck.png" |
SelectedImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box.png" Selected="true" /> |
<telerik:RadMenuItem Text="Username" Value="UserName" |
ImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box-uncheck.png" |
SelectedImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box.png" Selected="true" /> |
<telerik:RadMenuItem Text="Firstname" Value="FirstName" |
ImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box-uncheck.png" |
SelectedImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box.png" /> |
<telerik:RadMenuItem Text="Lastname" Value="LastName" |
ImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box-uncheck.png" |
SelectedImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box.png" /> |
</Items> |
</telerik:RadContextMenu> |
I get my menu as expected but my problem is then that it not is possible to select more than one item. When I select an item, all other items are getting deselected.
I'm aware that the exist an EnableHeaderContextMenu for the grid, but I'm not interested in the sorting and grouping functionality in this menu (sorting should only be done by click at the header), and I want to execute some serverside code, when select and deselecting columns - and not letting the grid do the column-hiding.
Best regards,
Kenneth