Hello,
I am having trouble accessing controls in a RadMenu ItemTemplate in javascript.
I've used the code snippet supplied in the RadMenu documentation. findItemByValue works, but calling findControl on that item to get to a control returns null.
Stepping into telerik's javascript, I can see that it does find a matching control id, but then returns null from the $find on that id.
Here is basically what I have:
<telerik:RadContextMenu ID="SearchContextMenu" runat="server">
<Items>
<telerik:RadMenuItem Value="FilterCustom">
<ItemTemplate>
<asp:TextBox ID="ContextMenuFilterTextBox" runat="server"></asp:TextBox>
</ItemTemplate>
</telerik:RadMenuItem>
</Items>
</telerik:RadContextMenu>
And my related script:
function RowContextMenu(sender, eventArgs) {
var menu = $find("<%=SearchContextMenu.ClientID %>");
//preload the filter textbox from the current cell
var menuItem = menu.findItemByValue("FilterCustom");
var textBox = menuItem.findControl("ContextMenuFilterTextBox");
textBox.value = evt.target.innerHTML;
}
Unfortunately, textBox is always null.
Can you reproduce this problem?
Thank you,
Eve