We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

RowSaved event not fired...

A GDBG is configured with the following options; gdbg.Model.Options.WrapCellBehavior = GridWrapCellBehavior.NextControlInForm; gdbg.Model.Options.EnterKeyBehavior = GridDirectionType.Down; The grid is initially set with an empty DataTable as source and EnableAddNew is set to true. The focus is set to the cell in the first row. When the user enters a value in the first cell and tabs its way out, the RowSaved is not generated. Only when the user presses enter or the down arrow, after entering a new value the RowSaved event is generated. We need a way to receive the RowSaved event everytime a new row is added to the DataSource.

2 Replies

AD Administrator Syncfusion Team March 2, 2005 03:33 PM UTC

I tried to set up a test sample to see this behavior. When I type into the 1st row of the empty grid, the grid immediately adds an empty AddNew row as the second row in the grid. If I then tab off theh changed cell in the 1st row, and then keep tabbing, when I tab off the 1st row to the newly added (and empty) 2nd row, RowSaved is raised for the 1st row. If I continue tabbing across the empty AddNewRow, the focus eventually moves off the grid onto the next control (and no RowSaved event is raised as there are no changes to this empty AddNewRow and it does not really appear in the DataSet). Is this the behavior you see? What behavior do you want? Here is the sample I used in 3.0.1.0. GDBG_RowSaved.zip


WC Walter Cedeno March 2, 2005 05:06 PM UTC

Thank you for your example. The behavior you have in the sample code is the behavior that we want but are not getting in our code. I investigated further why we are not seeing the same behavior. It looks like the EndEdit() operation we do in the GDBG CurrentCellMoved event handler was affecting the expected behavior. We removed this call and get the expected behavior. Thanks

Loader.
Live Chat Icon For mobile
Up arrow icon