If I use DataBinding to create my menuitems, and use the OnClientItemClicked event to call a javascript which calls a radwindow (popup), the called radwindow does not popup, rather it loads into the target pane.
(well it pops up briefly, then exits and reloads in the Target Pane)
However, when I Create the MenuItems in HTML, the call to the OnClientItemClicked javascript , does popup the radwindow correctly.
My workaround for this was "AppendDataBoundItems" and retain a menu item from HTML, such that my popup radwindow pops up correctly...Happiness,..BUT
It is AppendDataBoundItems,...and I really want PrePend,..i.e. I would like my MenuItem with Popup to appear at the end of the Menu, not the beginning.
Any help,..ideas ? (for either).
Code is:
RadMenu AdminAuthMenu = this.NavPane.FindControl("RadMenu1") as RadMenu;
AdminAuthMenu.DataSource = SiteMap.GetdbMenuItems(); //Just class with db sql to get MenuItems
AdminAuthMenu.DataBind();
protected void RadMenu1_OnItemDataBound(object sender, RadMenuEventArgs e)
{
RadMenuItem ei = e.Item as RadMenuItem;
ei.Target = "ContentPane";
}
Markup is:
telerik:RadMenu ID="RadMenu1" runat="server" Width="100%" Height="31px" Skin="Black"
OnClientItemClicked="MenuItemItemClicked"
DataFieldID="ScreenId"
DataNavigateUrlField="Screen"
DataTextField="Title"
DataValueField="ScreenId"
OnItemDataBound="RadMenu1_OnItemDataBound"
AppendDataBoundItems="True">
<DefaultGroupSettings Flow="Horizontal" />
<Items >
<telerik:RadMenuItem runat="server" Text="Login" value="Login"
BackColor="Transparent" ForeColor="#FFFFC0"></telerik:RadMenuItem>
</Items>