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
310
BeforeRowUpdate odd behavior
posted

Hi,

I am using BeforeRowUpdate to validate and save (or not) my user's current row of data.

The problem I have is when we add a new row. The grid is bound to a DataTable. We give them an add new row button and it adds an initialized row of data to the data table and then we expect them to add the missing data elements. We expect that when they move off the row, it will fire BeforeRowUpdate and save the data.

However, the BeforeRowUpdate event does not fire for this new row, only on existing rows. What event should I be using to decide when the user is done editing a new row?

Thanks,

Kent

Parents
  • 23930
    Verified Answer
    Offline posted

    Hi Kent,

    Thank you for posting to our forums.

    How exactly are you adding the new row? Is the user data added through the grid itself or through the data table? If it is added through the data table, no update events will be raised to the grid (it will just update its interface). You could consider using TemplateAddRow to add the data to the grid. Then the BeforeRowUpdate event will be raised and you can initialize the default data for the row in the InitializeTemplateAddRow event. If the data is added through the UltraGrid and the BeforeRowUpdate is not raised, please send me a small sample project that reproduces the issue and I will be glad to research it further.

    I am looking forward to hearing from you.

Reply Children
No Data