This question is locked. New answers and comments are not allowed.
Hi,
I have a Telerik MVC grid that has a column with a menu in it as well as a column with a panel bar in it. I recently added the panel bar to one of the columns and now when I click on items in the panel bar, the "onSelect" javascript function for the menu is executing -- and it is executing once for each row (for each panel bar). How does this happen?
Below is the code that defines both of the conflicting columns and I don't see how the menu jscript function is being bound to the panelbar. Any insight is appreciated.
Thanks,
Rob
--
Here is how I defined my menu:
Here is how I defined my panelbar:
I have a Telerik MVC grid that has a column with a menu in it as well as a column with a panel bar in it. I recently added the panel bar to one of the columns and now when I click on items in the panel bar, the "onSelect" javascript function for the menu is executing -- and it is executing once for each row (for each panel bar). How does this happen?
Below is the code that defines both of the conflicting columns and I don't see how the menu jscript function is being bound to the panelbar. Any insight is appreciated.
Thanks,
Rob
--
Here is how I defined my menu:
columns.Bound(o => o.Status) .ClientTemplate(Html.Telerik().Menu().Name("menuOrderStatus_<#=OrderId#>") .Items(menu => menu.Add().Text("<#=Status#>").HtmlAttributes(new { @style = "width:115px;", @class = "orderlist-current-order-status" }) .Items(submenu => { IList<string> orderStatuses = ViewData["AllOrderStatuses"] as IList<string>; foreach (string status in orderStatuses) submenu.Add().Text(status).HtmlAttributes(new { @style = "width:115px;" }); })) .ClientEvents(events => events.OnSelect("menuSelectOrderStatus").OnOpen("menuOpenOrderStatus").OnClose("menuClosed")) .Effects(fx => fx.Expand(animation => animation.CloseDuration(AnimationDuration.Fast).OpenDuration(AnimationDuration.Fast)) .OpenDuration(AnimationDuration.Fast).CloseDuration(AnimationDuration.Fast)) .ToHtmlString());Here is how I defined my panelbar:
columns.Bound(o => o.HasPhone).Title("Phone").ClientTemplate(Html.Telerik().PanelBar().Name("panelPhone_<#=OrderId#>").SelectedIndex(0).Items(item => { item.Add() .Text("Phone") .Expanded(false) .ImageUrl("~/images/icons/16/phone.png") .ImageHtmlAttributes(new { alt = "Patient Phone Numbers" }) .Items(subItem => { subItem.Add().Text("(h) <#=PatientHomePhone#>"); subItem.Add().Text("(c) <#=PatientCellPhone#>"); subItem.Add().Text("(w) <#=PatientWorkPhone#>"); });}).ToHtmlString());