ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
How to get send multiselect value in a column as input to a controller so that other column gets values based on the previous column selection
Title:
B
I
{code}
?
I want to send multiselect value in a column as input to a controller so that other column gets values based on the previous column selection. In the below example i want to send SelectedDisaggregateGroups to the DisaggregateController(GetMultipleChildDisaggregates function) so that i can return the list of Disaggregates based on the previous selection. @(Html.Awe().Grid("CalculatedIndicatorGrid") .Mod(o => o.PageInfo().InlineEdit(Url.Action("CalculatedIndicatorSave"), Url.Action("CalculatedIndicatorSave"), true, true, false)) .Url(Url.Action("GetCalculatedIndicators", "CalculatedIndicator")) .Height(500) .Parent("txtIndicator", "IndicatorName") .Columns( new Column { Bind = "CalculatedIndicatorID", Hidden = true } .Mod(o => o.InlineId()), new Column { Bind = "IndicatorName", Header = "Indicator" } .Mod(o => o.Inline(Html.Awe().AjaxDropdown("IndicatorID").CssClass("awe-txt selectMaxWidth").Controller("Indicator").Action("GetIndicators").Area("SI"))), new Column { Bind = "DisaggregateGroup", Header = "Disaggregate Groups" } .Mod(o => o.Inline(Html.Awe().AjaxCheckboxList("SelectedDisaggregateGroups").CssClass("awe-txt selectMaxWidth").Controller("DisaggregateGroup").Action("GetDisaggregateGroups").Parent("#PrefixIndicatorID", "indicatorID").Area("SI"))), new Column { Bind = "Disaggregates", Header = "Disaggregates" } .Mod(o => o.Inline(Html.Awe().AjaxCheckboxList("SelectedDisaggregates").CssClass("awe-txt selectMaxWidth").Controller("Disaggregate").Action("GetMultipleChildDisaggregates").Parent("#PrefixSelectedDisaggregateGroups", "disaggregateGroupID").Area("SI"))), new Column { Bind = "Operator", Header = "Operator", Width = 100 } .Mod(o => o.Inline(Html.Awe().AjaxDropdown("Operator").CssClass("awe-txt selectMaxWidth").Controller("Data").Action("GetCalculatedIndicatorOperators").Parameter("selected", ".(Operator)"))), new Column { ClientFormatFunc = "editff", Width = GridUtils.EditBtnWidth} ))
Save Changes
Cancel
Sridevi
asked at 23 Jul 2024
I would have been better if you would just told what you want to do from the user's point of view, it seems to me that you need cascading dropdowns (or multiselect) inside the inline grid row, this is done using the `ParentInline` extension, please have a look here: https://demo.aspnetawesome.com/GridInlineEditParent
at 23 Jul 2024
Omu
Hello, we are using 7.0 and wanted to check if we can accomplish this without updating the version. We are trying to make a backend call to the controller every time we click a checkbox in one of the columns ( Say column A) which will append to a list of related info in Column B.
at 24 Jul 2024
Riya Dasgupta
`ParentInline` was added before v 7.0 so you can try. You don't need to make any calls yourself, the lib will do the call for the child control when the parent value changes.
at 24 Jul 2024
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