ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Pass selected dropdown value to inline create in grid
Title:
B
I
{code}
?
I have a parent element (dropdown) in a grid and i want to pass the selected value of dropdown in create button click. How can i do that? i am getting the value as null when trying to access the parent value in create function. Code sample: the dropdown is outside the grid, When adding and saving a new row using the create button, I want to pass the dropdown value to create method in controller I have something like this: @Html.Awe().AjaxRadioList("oCountry").Url(Url.Action("GetCountries", "Data")).Odropdown().HtmlAttributes(new { style = "min-width:15em;"}) <button type="button" onclick="$('#DinnersGrid').data('api').inlineCreate()" class="awe-btn mbtn">Create</button> @(Html.Awe().Grid("Grid1") .Mod(o => o.PageInfo().InlineEdit(Url.Action("Create"), Url.Action("Edit"))) ...)
Save Changes
Cancel
warlok
asked at 08 Mar 2016
in the demo there's a button "create with predefined values", you can do the same: $('#DinnersGrid').data('api').inlineCreate({ CountryId: $('#oCountry').val() }) note, in the demo there's no Country column, but there is a Chef column and ChefId is being sent by the create button
at 09 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