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.
We don't provide a blur event for the WebDataGrid. If you have only the grid and WebDropDown it would be possible to handle The WebDropDown's Focus event to call commit on the Grid. Commit will not cause a postback if no data has been edited in the grid. You mentioned earlier that you want to update when the user leaves a row. If BatchUpdating is set to false, which is the default, this should happen automatically.
I've attached a sample which utilizes northwind for data. The sample takes a step back now that I have a better idea of what you are looking for and it makes use of Activation to allow the row to update when moving off of the row. It also uses the WebDropDown's Focus event to call commit when it gains focus.
Please test this and see if this setup is something you may be able to make use of.
Michael,
For the most case, this will work. The only issue is when the user clicks on a blank area of the page off of the grid. The grid loses focus, but does not update.
Hello,
In order to implement the behavior you described, I would recommend you to handle ExitedEditMode which fires when cell is out of the edit mode or you click outside of the grid. You can set condition to commit changes if needed as I have shown below.
<CellEditingClientEvents ExitedEditMode="WebDataGrid1_CellEditing_ExitingEditMode" />
function WebDataGrid1_CellEditing_ExitingEditMode(sender, eventArgs) { if (eventArgs.getCell().get_column().get_index() == 1) {
sender.get_behaviors().get_editingCore().commit(); } }
I have attached a sample for you to review. The sample is created as a website.
I hope this helps
In your example, the commit will only occur when the first column is edited. What I would like is to have the commit only occur when the user clicks somewhere other than the row that was just edited. My original issue with using the ExitedEditMode was that, after editing a field and tabbing to the next field, the commit occurs and returns focus to the cell that was just edited. Is there a way to manually activate the next cell after the commit? If I could do that, I think it would solve my problems.
Hi,
I am facing problem migrated with 11.1(Ultrawebgrid) to 14.1(Webdatagrid).
I am upgrading ultrawebgrid(11.1 dll) with webdatagrid(14.1 dll) but most of the events properties and Tags are not supported with webdatagrid.
can you please help me to use the webdatagrid(14.1) and which events, properties and Tags are migrated with ?