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
245
a new child row causes data to be committed to the datasource though updatemode = OnUpdate
posted

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?

Parents
  • 12480
    Offline posted

    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.

Reply Children