Hi,
When i add or edit one grid and at the same time try to edit another grid, its foreign key is not showing its template. I need to know how to get a id unique for my editor template. Now I show you the secene
I have two views, in the first view I call to the second view
In the second view I have next sentence:
The grid on the second view:
The template "GetWasteByServeis" needs something to be unique:
In this thread I find information relationed.
http://www.telerik.com/forums/grid-foreign-key-field-sometime-shows-textbox
Thanks in advance.
Xavier.
When i add or edit one grid and at the same time try to edit another grid, its foreign key is not showing its template. I need to know how to get a id unique for my editor template. Now I show you the secene
I have two views, in the first view I call to the second view
@(Html.Kendo().TabStrip() .Name("service_details_tabstrip_#=ServiceID#") .Items(items => { items.Add().Text("Detall Residus") .Selected(true) .LoadContentFrom("Waste", "Serveis", new { id = "#=ServiceID#" });}) .ToClientTemplate()In the second view I have next sentence:
string serviceID = ViewBag.ServiceID.ToString();The grid on the second view:
@(Html.Kendo().Grid<ServiceDetailViewModel>() .Name("waste_details_" + serviceID) .ToolBar(t =>{ if (User.IsInRole("Modify")){ t.Create().Text("Afegir Residu"); t.Custom().Text("Afegir Residus Contracte").HtmlAttributes(new { id = "wasteContract_" + serviceID }); }}) .Columns(columns =>{ columns.Bound(f => f.DetailID); columns.ForeignKey(f => f.Reference, (System.Collections.IEnumerable)ViewBag.CatalegResidus, "Value","Text").EditorTemplateName("GetWasteByServeis").Width(400);The template "GetWasteByServeis" needs something to be unique:
@(Html.Kendo().DropDownList() .Name("Reference_@serviceID") <=== this it's not ok .DataTextField("Text") .DataValueField("Value") .Filter(FilterType.Contains) .OptionLabel("-please select-") .ValuePrimitive(true) .AutoBind(false) .DataSource(source =>{ source.Read(read => { read.Action("SearchWaste", "Serveis").Data("filterSearchWaste"); }) .ServerFiltering(true);}))In this thread I find information relationed.
http://www.telerik.com/forums/grid-foreign-key-field-sometime-shows-textbox
Thanks in advance.
Xavier.