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
450
How to insert a new row in wingrid without the user say so
posted

I have a wingrid and I have allowed addrow - fixed row at bottom. But as soon as I click on the row, the row is inserted in grid. I want to stop that and instead insert the row only when user clicks on a + Button.

I am trying to do so because I have many interrelated wingrids in the form which are interrelated by the cellupdate / cellclick events so when user has not finished entering all values in new row the events gets fired and it creates too many complications....

  • 469350
    Offline posted

    Hi,

    There's no way to do this. That's just not the way data binding works in DotNet.

    When you click on the AddNew row in the grid, an AddNew Row is added to the data source. This row is a temporary row - it is not committed to the data source until you commit the row in the grid, either by moving off of that row or calling Update or UpdateData on it. This row may be cancelled before it is committed by pressing Escape twice or by calling CancelUpdate.