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
255
Setting a empty binding list to the UltraWinGrid datasource multiple times adds empty rows to the binding list.
posted

Hi,

I have a a dialog that has a empty binding list passed to it when it is displayed. The binding list is set to a UltreWinGrid datasource. 

If i close the dialog the binding list is still active in the application.

However, when I re-open the dialog, an empty row is added to the binding list when the grid datasource is set. 

When the dialog is opened for the first time and before the Grid datasource is set the binding list onListChanged Method is null.

After the grid datasource is set there is a onListChanged method set.

The next time the dialog is opened and the grid datasource is set, the binding list onListChanged method is fired adding and subtracting items several times.

Thie onListChanged seems to be fired by the CurrencyManager. 

I cannot figure how or why this is happening.

The only way I have been able to get around this issue, is to set the RaiseListChangedEvents property for the binding list to false before settting it to the grid datasource.

Does anyone know what could be happening for the row to be added when I am setting the data source?

Thanks