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
205
How to identify modified rows in a grid.
posted

I want to ask you if there is any way to highlight any modified rows in a grid so that these rows appear modified (change colour, font or whatelse) to the user until the commit is done.

Best regards,

  • 469350
    Verified Answer
    Offline posted

    Hi,

    It depends what you mean by "modified". Modified in relation to what?

    The grid can only actually have one row with pending edits. Once you leave the row, the grid updates it's DataSource and the row is essentially committed at that point.

    If you are using a DataSet or DataTable as your grid's DataSource, then the table keeps track of changes you make so that you can update the back end later. So if that's what you mean by "modified", then you could do this in the InitializeRow event of the grid.

    What you would do is get the e.Row.ListObject. This will returning the object from the data source that the grid row is representing. From there, you should be able to get the state of the row from the ListObject or the DataTable and then you could apply an appearance to the row.