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.
ADAdministrator Syncfusion Team March 2, 2005 10:33 AM
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 126.96.36.199. GDBG_RowSaved.zip
WCWalter CedenoMarch 2, 2005 12:06 PM
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.