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
540
Make whole grid "non-edited"
posted

Hi,

I am simulating an Excel like control with the wingrid. It uses an UltraDataSource as data source.
When user selects a range of cells, and presses DEL, I remove all the data in the selected cells.
The code for this:

foreach (UltraGridCell cell in _grid.Selected.Cells)
{
    cell.Value = DBNull.Value;
}

This works fine, but it leaves the affected rows in edit mode.

See the pencil icons at the beginning of the rows.

I tried SuspendBindingNotifications before, did not help.
Tried SuspendRowSynchronization before, did not help.
Tried PerformAction(CommitRow) after, did not help.

How could I make the grid to "commit" these changed rows, or prevent this?

Thanks

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi,

    How are you clearing out the cell values? Are you doing it yourself or are you using the grid's built-in AllowMultiCellOperation funtionality?

    Either way, what you need to do is commit the changes to the data source after the operation completes. You do this by calling grid.UpdateData().

Children