I am trying to have a context menu in my grid but have no joy so far...
My grid is populated via assigning a DataSource in an Ajax Request.
In the ..._ItemDataBound, I assign a Tooltip to each item.
Before the Grid is populated, the code shows the context menu fine on the label and on the datagrid.
The GridRowContextMenu(...) does not fire which I suppose is normal since there are no rows.
After the grid is populated, the GridRowContextMenu() javascript fires all right but there is no more context menu on the Grid...
Am I supposed to do something when DataBinding the grid?
Thanks
Eric
| <telerik:RadContextMenu ID="GridContextMenu" runat="server"> |
| <Targets> |
| <telerik:ContextMenuControlTarget ControlID="RadGridKids" /> |
| <telerik:ContextMenuControlTarget ControlID="Label1" /> |
| </Targets> |
| <Items> |
| <telerik:RadMenuItem runat="server" Text="Root Stuff"> |
| <Items> |
| <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 1"> |
| </telerik:RadMenuItem> |
| <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 2"> |
| </telerik:RadMenuItem> |
| </Items> |
| </telerik:RadMenuItem> |
| <telerik:RadMenuItem runat="server" Text="Root Item 2"> |
| </telerik:RadMenuItem> |
| </Items> |
| </telerik:RadContextMenu> |
| <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> |
| <telerik:RadGrid ID="RadGridKids" runat="server" GridLines="Horizontal" OnItemDataBound="RadGridKids_ItemDataBound" |
| AutoGenerateColumns="False" Height="99%" ShowStatusBar="True" GroupingEnabled="False"> |
| <MasterTableView CellSpacing="-1"> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px" /> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn> |
| <HeaderStyle Width="20px" /> |
| </ExpandCollapseColumn> |
| <Columns> |
| <telerik:GridBoundColumn HeaderText="Node Description" UniqueName="NodeDesc"> |
| </telerik:GridBoundColumn> |
| </Columns> |
| </MasterTableView> |
| <ClientSettings> |
| <Selecting AllowRowSelect="True" /> |
| <Scrolling AllowScroll="True" UseStaticHeaders="True" /> |
| <ClientEvents OnRowContextMenu="GridRowContextMenu" /> |
| </ClientSettings> |
| </telerik:RadGrid> |
My grid is populated via assigning a DataSource in an Ajax Request.
In the ..._ItemDataBound, I assign a Tooltip to each item.
Before the Grid is populated, the code shows the context menu fine on the label and on the datagrid.
The GridRowContextMenu(...) does not fire which I suppose is normal since there are no rows.
After the grid is populated, the GridRowContextMenu() javascript fires all right but there is no more context menu on the Grid...
Am I supposed to do something when DataBinding the grid?
Thanks
Eric