Hi, I'm not seeing the UltraWinGrid with a datasource set to a .net BindingSource honor the RaiseListChangedEvents = false. Can you give me some guidance on this ?
We are using a list<t> that implements ITypedList and we set the grid's datasource to the bindingsource and then the bindingsource.datasource = my list.
We do not want the WInGrid to update its contents when the underlying data source changes. If I set the bindingsource.RaiseListChangeEvents = false, the grid is still updating the cell contents via the ITYpedList get PropertyDescriiptor.GetObject(). I am forced to return the real object that has been updated and I thought the grid will preseve the original values if I turned off the raiselistchangedevents.
Hoping there is a minor change we can make.
thanks
I would suggest using a local copy of the data source in this case instead, and update a different data source when you need to; when you need to update the grid, rebind to the new data source. If you're worried about efficiency in storing two data sources, think of it this way: regardless of whether the grid caches all of the values or you do, *someone* has to store a copy of the data source, so either way you'll still have 2 copies of the data.
-Matt
Hi Matt - thanks for the quick reply! I was afraid of that... that certainly makes sense... I guess there's no way to have the grid (in this case they are results of a search) keep the old values other than to use non-bound columns like we did before but that is extremely inefficient too for large result sets. thanks
The grid doesn't cache any values of the cells that are displayed, since this would be extremely inefficient, so if the grid is invalidated in any way, it will need to ask the DataSource what the current cell value is. From what you're describing, it seems like something is invalidating the grid, either through an event of the data source or something else. Unfortunately, there's no way that I can think of to have the grid retain the old values if the underlying DataSource is updated, short of having the grid bound to a different object. The RaiseListChangedEvent should simply prevent the grid from being *notified* that the object has changed, but the next time it is invalidated, it will pick up the change.