ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
update grid inline edit control on change in a different cell
Title:
B
I
{code}
?
Using Grid inline editing, I'd like to use javascript to monitor for change, and if so, I want to update another. But I'm having a problem getting javascript to fire off when that cell is changed. I tried using this: $('#Expense').on("change", function () { var profit = $('#Revenue').val() - $('#Expense').val() $('#Profit').val(profit); });
Save Changes
Cancel
Sean Davidson
asked at 30 Jun 2022
Answers
B
I
{code}
?
here's an example using our demo here https://demo.aspnetawesome.com/GridInlineEditDemo you could paste the code in the console and see it in action. $('#DinnersInlineCrudGrid').on('change', function(e){ var trg = $(e.target); var inlc = trg.closest('.oinlc'); var name = trg.attr('name'); if (!inlc.length || !name) return; var row = trg.closest('.awe-row'); if (name == 'Date'){ var dateValue = trg.val(); var txtName = row.find('[name="Name"]'); txtName.val(dateValue).change(); } });
Save Changes
Cancel
Omu
answered at 01 Jul 2022
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