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
175
Commit a row to UltraWinGrid
posted

Hello,

I need some help here adding a row to this grid which is based on a table.

Currently, I am using OnAfterRowInsert to add a copy of the previous row.  The only problem is the it does not commit the row.  You must type in a cell to get the row to add to the grid.

When you type in a cell a 'gray' row appears below the row being edited.  That functionality is what I need to perform programatically.

Can someone show me how to do that.  Is there something that you can do to get the table to commit the row just added?

Thanks,

  • 469350
    Offline posted

    Hi,

    It sounds like you are talking about the TemplateAddRow. This row doesn't become a "real" row until the user types something in it. But if you want to simulate this and make it a real row in code, what you do is set the AddRowModifiedByUser property on the rows collection to true.

    I'm not entirely sure I understand what you are doing in the AfterRowInsert event, but you probably just need to add something like this:

     

                e.Row.ParentCollection.AddRowModifiedByUser = true;