After binding my grid to the datasource and then loading data into my datasource, I set the grid's updatemode to onupdate. I then add a new row to the topmost band. Everything is fine so far. The row selector shows a pencil icon indicating that the row changes have not been written to the datasource. I then, through code, add a child row to the newly added row. When this happens the parent row is committed to the datasource (I know this because the pencil icon disappears from the parent row). How can I prevent the parent row from being committed?
Hello,
This update mode will not work the way you are expecting.
The UpdateMode.OnUpdate setting was carried over from the ActiveX version of the UltraGrid. But the CurrencyManager in .NET doesn't really allow this setting to work because any time the CurrencyManager's current Position is changed, it does an implicit End and commits the changes to the previous current row.
Please let me know if you have any questions.
So, can supply some instructions as to how I am supposed to differentiate between data loaded into the grid at the start and changes made by the user?
Please share your code to demonstrate how you are adding the row. I will provide more information based on the method you are using to accomplish this.