ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Cascading grids problem
Title:
B
I
{code}
?
When a row is selected on the ProductsGrid, it doesn't load the ProductCharsGrid grid. I also tried using the first grid by its own, but to no avail. Any suggestions? Am I doing something wrong? <div class="bar"> <button type="button" onclick="awe.open('createProductsGrid')" class="awe-btn mbtn">@Mui.Button_Create</button> </div> @Html.InitCrudPopupsForGrid("ProductsGrid", "Products") @(Html.Awe().Grid("ProductsGrid") .Mod(o => o.PageInfo().ColumnsSelector().ColumnsAutohide()) .Url(Url.Action("GridGetItems", "Products")) .Selectable(SelectionType.Single) .Columns( new Column { Name = "Id", Width = 55, Header = Mui.Field_Id, Sort = Sort.Asc }.Mod(o => o.Nohide()), new Column { Name = "Name", Header = Mui.Field_Name }.Mod(o => o.Nohide()), new Column { ClientFormat = GridUtils.EditFormatForGrid("ProductsGrid"), Width = 50 }.Mod(o => o.Nohide()), new Column { ClientFormat = GridUtils.DeleteFormatForGrid("ProductsGrid"), Width = 50 }.Mod(o => o.Nohide()))) <!-- Detail for Characteristics --> <div class="bar"> <button type="button" onclick="awe.open('createProductCharsGrid')" class="awe-btn mbtn">@Mui.Button_Create</button> </div> @Html.InitCrudPopupsForGrid("ProductCharsGrid", "ProductCharacteristics") (Html.Awe().Grid("ProductCharsGrid") .Mod(o => o.PageInfo().ColumnsSelector().ColumnsAutohide()) .Url(Url.Action("GridGetItemsForProductId", "ProductCharacteristics")) //.Height(450) .Columns( new Column { Name = "Id", Width = 55, Header = Mui.Field_Id, Sort = Sort.Asc }.Mod(o => o.Nohide()), new Column { Name = "Description", Header = Mui.Field_Description }.Mod(o => o.Nohide()), new Column { ClientFormat = GridUtils.EditFormatForGrid("ProductCharsGrid"), Width = 50 }.Mod(o => o.Nohide()), new Column { ClientFormat = GridUtils.DeleteFormatForGrid("ProductCharsGrid"), Width = 50 }.Mod(o => o.Nohide()))) <script> $(function () { $('#ProductsGrid') .on('aweselect aweload', function () { var ids = $(this).data('api').getSelection().map(function (o) { return o.Id; }); $("#ProductCharsGrid").data('api').load({ params: { productIds: ids } }); }); }); </script>
Save Changes
Cancel
theodore
asked at 07 Mar 2016
http://aspnetawesome.com/learn/mvc/CommonProblems#Isolate-the-problem
at 07 Mar 2016
Omu
Answers
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