I am adding data directly to an UltraGrid through a templateAddRow. When I click into the template row, and click back to a previously added row, it 'cancels' the new template row, but it also removes the first newly added row. Like.. from the top of the grid. This makes no sense to me. Am I doing something wrong?
Hi,
Obviously, that's not desirable or correct behavior. My guess is that there isn't actually any way via IBindingList to cancel just a single row, so the grid is probably telling the data source to cancel all pending changes and for some reason, your first row has not been committed.
How are you adding the first row? If you are doing it through the grid, then that row should be committed as soon as you leave the row. Unless you changed the UpdateMode property on the grid so that it does not do that.
My best guess is that you are adding that row in code and not committing it.
What kind of data source are you using? And how are you adding that row?
If you are using a DataTable/DataSet, you might have to call CommitChanges after you add the row so it gets committed.
The data source is a Csla BusinessListBase. I struggled to get the template row function to work, but it was because the object did not have a public parameterless constructor. Now the template row works, but it is not committing. I have not changed the update fuction. I was adding the row through the template add row.
If I call AddRow() from the BusinessListBase, it works fine, so I think I'll leave it at that. I'm tired of messing with this.