views:

705

answers:

2

I have an XtraGrid with the datasource set to a BindingList. Some of the fields in the grid are editable. The problem is that the list gets a lot of updates for some other fields (not the ones I can edit), which causes the binding to refresh. If I was in a cell part way through editing a field, this is discarded and the editor closes.

Is there a way I can make the cell with the editor open not be refreshed? Or even make that whole row not refresh if I have to?

A: 

Post your question at http://www.devexpress.com/Support/Center/. You should get your answer within few hours.

Przemaas
+2  A: 

On the grid view you can call BeginDataUpdate() to "prevent visual and internal data updates" until EndDataUpdate() is called.

So you could do something like this (the events you attach to may be not be the best, but you get the idea):

private void gridView1_CellValueChanging(object sender, CellValueChangedEventArgs e)
        {
             gridView1.BeginDataUpdate();
        }

private void gridView1_CellValueChanged(object sender, CellValueChangedEventArgs e)
        {
             gridView1.EndDataUpdate();
        }
csjohnst