Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
345
First added row is deleted on update
posted

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?

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    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.

Children