Hi,
I have a context menu that's inside of a .NET repeater and I'm trying to use the menu's show method when a repeater row is clicked on. The menu shows when a row is clicked but I'm having trouble binding the menu to that particular row - clicking on any row of the repeater causes the menu to be bound to the last row in the repeater. I was wondering if there is a way to do this?
The code is basically:
<asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="rptSchedules_ItemDataBound">
<ItemTemplate>
<tr data='<%# Eval("ddd") %>' runat="server" id="trItemRow" onclick="javascript: showConMenu(this,event); return false;">
<td>
<%# GetFormattedDateDisplay(Eval("InTime"))%>
</td>
<td>
<%# GetFormattedDateDisplay(Eval("OutTime"))%>
</td>
</tr>
<telerik:RadContextMenu runat="server" ID="ctxRowMenu" OnItemClick="TelerikMenuItemClick"
OnClientItemClicked="Client_MenuClicked" OnClientLoad="conMenuLoad">
<Items>
<telerik:RadMenuItem Text="Add" runat="server" PostBack="true">
</Items>
<Targets>
<telerik:ContextMenuControlTarget ControlID="trItemRow" />
</Targets>
</telerik:RadContextMenu>
</ItemTemplate>
</asp:Repeater>
Thanks,
Bill
I have a context menu that's inside of a .NET repeater and I'm trying to use the menu's show method when a repeater row is clicked on. The menu shows when a row is clicked but I'm having trouble binding the menu to that particular row - clicking on any row of the repeater causes the menu to be bound to the last row in the repeater. I was wondering if there is a way to do this?
The code is basically:
<asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="rptSchedules_ItemDataBound">
<ItemTemplate>
<tr data='<%# Eval("ddd") %>' runat="server" id="trItemRow" onclick="javascript: showConMenu(this,event); return false;">
<td>
<%# GetFormattedDateDisplay(Eval("InTime"))%>
</td>
<td>
<%# GetFormattedDateDisplay(Eval("OutTime"))%>
</td>
</tr>
<telerik:RadContextMenu runat="server" ID="ctxRowMenu" OnItemClick="TelerikMenuItemClick"
OnClientItemClicked="Client_MenuClicked" OnClientLoad="conMenuLoad">
<Items>
<telerik:RadMenuItem Text="Add" runat="server" PostBack="true">
</Items>
<Targets>
<telerik:ContextMenuControlTarget ControlID="trItemRow" />
</Targets>
</telerik:RadContextMenu>
</ItemTemplate>
</asp:Repeater>
Thanks,
Bill