49
Views
4
Comments
Solved
Record not saved in datagrid on change event
Question

I am calling onSave event when I change a record in DataGrid dropdown column and record is not saved. It works when I click onSave button, but not onChange event.  Why is it not saving?

2024-10-09 04-44-30
Bhanu Pratap
Solution

Hi Edward,

Can you please share the screenshot of the onchange event handler (client action) or OML file.

Maybe It is not passing the Id from the drop-down. So, it won't be storing the data in entity because if it is not getting the id while saving it. It would be passing 0 as Id which will not save the data as Id is unique and auto number.

UserImage.jpg
Ayush Bankhede

Thank You @Bhanu.ps It worked for me.

UserImage.jpg
Edward Muratov

Then how come it works when I click on save button?

2024-10-09 04-44-30
Bhanu Pratap

That time it may be passing the Id check with assign that you have used while clicking in save button pass the same for onchange. If you are clicking on dropdown that particular select id should be passed. You can use debugger and check if the id is passing or not to onchange.

It would be more clear if you can share actions screen shot.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.