Tiago, your experience here will be invaluable….
I have a DGV with AllowUserToAddRows = true and EditMode = OnEnter and saving to my db on RowLeave. I go to the last empty line, it opens up TextBox for insertion, then I regret it and move the cursor up. The RowLeave event fires and it goes on to save to the db. The problem is that DGV’s Datasource has a new record with the empty values of the last DGV row and my validation fails. It seems that, although I abandoned insertion, a new record is inserted into the Datasource. If this is true, there should be two empty rows in the grid, the one with the empty values I just entered and the new “new record” row….(by the way, a “new” icon there would be very useful, like the “*” icon in old dgv’s).
So, if the underlying behaviour is as I suspect, there should be two empty rows to indicate that a new (empty value row) was inserted.
The ideal would be that if nothing is inserted in the new row, there is nothing added to the Datasource.
Unless I’m missing something! 🙂
This is the general behavior when AllowUserToAddRows is true:
The new row icon (+) is there already, also with the editing icon (pencil). But you probably need to update the Classic-2 theme in your app. Hopefully the themes won’t change much after the release. The next two big changes in all the themes will be: ListView, PropertyGrid, and the Collapsible Nested Rows in the DGV.
Please login first to submit.