I have a WebDataGrid that is populated from a database. I also have a button and a dropdown on the page. The dropdown controls what data is displayed in the WebDataGrid. The RowUpdating gets called when I update a value and click on another row or click the button. However, if I click the dropdown or anywhere else on the page, RowUpdating does not get called. I need it to be called whenever the WebDataGrid loses focus and a row has been updated.
Jeff
Dear Jeff,
Thank you for contacting Infragistics!
We have received your support request concerning the RowUpdating not firing when the grid loses focus, and this case has been assigned to me. Infragistics is dedicated to helping you solve this issue. Our team and I have done an initial review of your case and I will create a sample to test this case. If you already have a sample that I can use as a starting point, that will help to resolve the case faster.
I am looking into why this may be occurring for you and will get back to you sometime Wednesday with more information or questions for you.
Looking forward to hearing from you.
Hi Jeff,
I found the following forum post that is similar to your question.
http://www.infragistics.com/community/forums/p/50225/264161.aspx#264161
Handling the CellEditing's ExitedEditMode event this way will cause the grid to update each time you stop editing a cell.
If you have any further questions or concerns with this please let me know and I'll be glad to help.
Michael,
That solution helps, but causes other issues. First, if a user Tabs to the next field, the OnRowUpdating event fires and after the update, focus returns to the field that was just edited. Also, if the user edits a field and then clicks on a drop-down that is not on the grid, the user would have to re-click to select from the drop-down. Is there a way to do this same sort of thing, but only when the user leaves the row, not a cell?
Thanks for the update. I'm going to need more a little more time to research this. I can have another update on my progress for you by Thursday.
If you have any questions or concerns with this please let me know and I'll be glad to help.
Thank you for your patience with this. You can use logic inside the ExitedEditMode event to check if the user was on the last cell in the row.
The following code snippet will perform this:
if (eventArgs.getCell().get_column().get_index() == eventArgs.getCell().get_row().get_cellCount() - 1) {
sender.get_behaviors().get_editingCore().commit();
}
Please let me know if you have any further questions or concerns with this and I'll be glad to help.