This question is locked. New answers and comments are not allowed.
Hi... I've detected what I guess must be a bug in the Grid control.
I have this grid (master/detail):
Ok, now the 2nd column of the child grid (the one bound to o.Child) has a template with a Telerik.ComboBox like this:
I run this, and when I click on the nested (child) grid's "Edit" or "Insert" button, is the master grid the one that enters edit mode or adds a new record and enters edit mode.
If I remove the .DropDownHtmlAttributes() call from the template's combobox builder, everything works as expected.
Is this a reported bug?
Thanks!!!
I have this grid (master/detail):
<%= Html.Telerik().Grid<myMasterModel>() .Name("MasterGrid") .Pageable(page => page.PageSize(15).Position(GridPagerPosition.Both)) .ClientEvents(ev => ev.OnError("onMasterError")) .Sortable(order => order.OrderBy(o=>o.Add(e=>e.Name)).SortMode(GridSortMode.MultipleColumn)) .Scrollable(scroll => scroll.Height(300)) .DataKeys(datakeys => datakeys.Add(o => o.Id)) .ToolBar(tb => tb.Insert()) .Editable(conf => conf.Enabled(true)) .DataBinding(databinding => databinding.Ajax() .Select("_Select","myController") .Update("_Update", "myController") .Delete("_Delete", "myController") .Insert("_Insert","myController")) .Columns(columns => { columns.Command(cm => { cm.Edit(); cm.Delete(); }) .Width(180).Title("Actions"); columns.Bound(o => o.Name).Width(250); columns.Bound(o => o.Description); }) .DetailView(dv => dv.ClientTemplate( // Nested (child) grid Html.Telerik().Grid<myChildModel>() .Name("ChildGrid_<#= Id #>") .DataKeys(keys => keys.Add(o => o.Id)) .ClientEvents(ev => ev.OnError("onChildError").OnSave("onChildSave")) .DataBinding(databind => databind.Ajax() .Select("_ChildSelect", "myController", new { masterId = "<#= Id #>" }) .Delete("_ChildDelete", "myController", new { masterId = "<#= Id #>" }) .Update("_ChildUpdate", "myController", new { masterId = "<#= Id #>" }) .Insert("_ChildInsert", "myController", new { masgterId = "<#= Id #>" })) .ToolBar(tb => tb.Insert()) .Columns(columns => { columns.Command(cm => { cm.Edit(); cm.Delete(); }).Title("Actions").Width(180); columns.Bound(o => o.Child).ClientTemplate("<#= Child.Name#>").Title("Child"); columns.Bound(o => o.Child.SomeProp.Nombre).ReadOnly().Title("SomeProp").Width(150); columns.Bound(o => o.Child.SomeOtherProp.Nombre).ReadOnly().Title("SomeOtherProp").Width(150); columns.Bound(o => o.Child.Code).ReadOnly().Title("Code").Width(150); }) .Sortable() .Editable(conf => conf.Enabled(true)) .Pageable(action => action.PageSize(5)) .Filterable().ToHtmlString())) %>Ok, now the 2nd column of the child grid (the one bound to o.Child) has a template with a Telerik.ComboBox like this:
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<ChildClass>" %> <%=Html.Telerik().ComboBox().Name("Child") .Filterable(ft => ft.FilterMode(AutoCompleteFilterMode.Contains).MinimumChars(5)) .DataBinding(db => db.Ajax().Select("_selectChildComboboxItems", "myController")) .ClientEvents(ev => ev.OnChange("checkComboBox")) .DropDownHtmlAttributes(new { style = "width:300px" }) %> <script type="text/javascript"> $(document).ready(function() { bindGridComboBox("Child"); }); </script> I run this, and when I click on the nested (child) grid's "Edit" or "Insert" button, is the master grid the one that enters edit mode or adds a new record and enters edit mode.
If I remove the .DropDownHtmlAttributes() call from the template's combobox builder, everything works as expected.
Is this a reported bug?
Thanks!!!