I've searched the tutorials, documentation and forum for a simple example of binding data to a child item.
Can you please provide an example of binding a DataTextField to a child item for a rad menu? When I set the DataSourceID of a radmenu, it will automatically bind to the root. Here is a small example of what I'm looking for:
Thanks,
Gunjan
Can you please provide an example of binding a DataTextField to a child item for a rad menu? When I set the DataSourceID of a radmenu, it will automatically bind to the root. Here is a small example of what I'm looking for:
| <RadContextMenu ID="RadContextMenu1" runat="server" DataSourceID="SqlDataSource1"> |
| <Targets> |
| <telerik:ContextMenuControlTarget ControlID="RadPanelBar1" /> |
| </Targets> |
| <Items> |
| <telerik:RadMenuItem Text="Child Item 1"> |
| <Items> |
| <telerik:RadMenuItem> |
| <ItemTemplate> |
| <telerik:RadMenuItem Text='<%# Eval("FIELD_NAME") %>' Value='<%# Eval("FIELD_ID") %>' /> |
| </ItemTemplate> |
| </telerik:RadMenuItem> |
| </Items> |
| </telerik:RadMenuItem> |
| <telerik:RadMenuItem Text="Child Item 2"> |
| <Items> |
| <telerik:RadMenuItem> |
| <ItemTemplate> |
| <telerik:RadMenuItem Text='<%# Eval("FIELD_NAME") %>' Value='<%# Eval("FIELD_ID") %>' /> |
| </ItemTemplate> |
| </telerik:RadMenuItem> |
| </Items> |
| </telerik:RadMenuItem> |
| </Items> |
| </RadContextMenu> |
Thanks,
Gunjan