ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Problem implementing Cascading DropdownList in the Inline grid editing
Title:
B
I
{code}
?
I am trying to implement Cascading DropdownList in the inlinegrid, but the second and the third list do not work fine, do you have some example little example on how to work with it. my code: <div class="bar"> <button type="button" onclick="$('#DireccionesGrid').data('api').inlineCreate()" class="awe-btn mbtn">Nuevo</button> </div> @Html.InitDeletePopupForGrid("DireccionesGrid", "GridInlineEditDemo") @(Html.Awe().Grid("DireccionesGrid") .Mod(o => o.PageInfo().InlineEdit(Url.Action("Create"), Url.Action("Edit"))) .Url(Url.Action("GridGetItemsDir")) .Parent("txtSearch", "search") .Height(250) .Resizable(true) .ShowGroupBar(false) .Columns( new Column { Bind = "DI_Id_Direccion", Width = 55 }.Mod(o => o.InlineId()), new Column { Bind = "Pais.PA_Pais", ClientFormat = ".Pais", Header = "Pais", Width = 150 } .Mod(o => o.Inline(Html.Awe().AjaxDropdown("PA_Cod_Pais").Url(Url.Action("GetPaises")))), new Column { Bind = "Estado.ED_Estado", ClientFormat = ".Estado", Header = "Estado", Width = 150 } .Mod(o => o.Inline(Html.Awe().AjaxDropdown("ED_Cod_Estado").Parent("PA_Cod_Pais").Url(Url.Action("GetEstado")))), new Column { Bind = "Ciudade.CY_Ciudad", ClientFormat = ".Ciudad", Header = "Ciudad", Width = 150 } .Mod(o => o.Inline(Html.Awe().AjaxDropdown("CY_Ciudad").Parent("ED_Cod_Estado").Url(Url.Action("GetCiudad")))),
Save Changes
Cancel
Juan Equiz
asked at 04 Dec 2015
Answers
B
I
{code}
?
it doesn't work because the actual Id of the inline editor has the Grid's id and item key as prefix so try this instead .Parent("#PrefixPA_Cod_Pais") remember that inside Column().Mod( you're setting a string format, #Prefix will be replaced with gridId+item.key
Save Changes
Cancel
Omu
answered at 04 Dec 2015
Thank a lot for your help, it is working fine now.
at 04 Dec 2015
Juan Equiz
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK