ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Grid inline edit read-only cell
Title:
B
I
{code}
?
How could I enable or disable inline editing for a cell based on another value in the row ? My current column is this: new Column { Bind = "Eligible", Header = "Eligible?", Width = 65 } .Mod(o => o.Inline(Html.Awe().AjaxRadioList("Eligible").Odropdown().Url(Url.Action("GetYesNo", "Misc")))) And I'd like to use the value in a column called "NeverEligible" to determine whether or not the Eligible column should be enabled for editing.
Save Changes
Cancel
Sean Davidson
asked at 11 Aug 2021
please have a look at this demo: https://demo.aspnetawesome.com/GridInlineEditDemo/ConditionalDemo
at 11 Aug 2021
Omu
I'm having a problem with the params part of the Inline fuction. I copied in both your column definition and the function and created columns names identical to yours ('Date' and 'DateReadOnly'). The function is sending back the correct params value of 0 or 1 based on the value of 'DateReadOnly', but I'm getting an error in the console saying that it cannot read from property '1' or '0' of NULL. So does it not recognizing the 2 lines in the column definition starting with ".Inline"?
at 11 Aug 2021
Sean Davidson
You're probably using an older version, since 6.7 there was a modification https://www.aspnetawesome.com/learn/release/Version6-7#Migrating-from-previous-versions think you probably need to do as explained above, only backwards
at 11 Aug 2021
Omu
That was it, I was able to change to that format and now it works as expected! Thanks!
at 11 Aug 2021
Sean Davidson
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