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
370
How to suspend and resume ultraGrid showing new changes fromt he binding source
posted

Hi,

I have a ultraGrid that binds to a BindingSoruce. The BindingSource binds to a dataset.

BindingSource m_bindingSource = new BindingSource(dataset, "myTable");

m_ultraGrid.DataSource = bindingSource;

I also have a text box that showing one of the row's column value in "myTable". We use our own custom binding in this case so that when the text box value change, it updates the column for the corresponding row directly. (i.e. dataSet.myTable["columnName"] = updatedValue);

The ultraGrid immediately shows any changes if the anything changes in "myTable", that's works great.

Now, I would like ultraGrid not to reflect any changes until the dataSource is all updated.

I tried using one or combination of the following:

1. m_ultraGrid.BeginUpdate();

2. m_ultraGrid.SuspendRowSynchronization();

3. m_bindingSource.SuspendBinding();

I looked up on SuspendRowSynchronization and bindingSource.SuspendBinding which I don't think I am using it right. However, it seems like m_ultraGrid.BeginUpdate() should prevent grid showing reflect changes from the binding source.

Is it possible to defer the ultraGrid update when the bindingSource changes? If so, how to do that?

In my design, user can't interact with the gird until they finish complete editing the dataSource.

All these interaction is done in the UI thread.

Thanks