We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

DataSource objects

I am noticing a difference in the grid between when i bind to a DataTable and when i bind to a BindingList<>.

The grid notices changes to the DataTable and updates the view accordingly. When I change a value it gets updated immediately and the cell blinks (as I have it set to). But for the BindingList<> this does not occur. I have to call grid.Refresh() for the changes to show and the cells do not blink. This takes up a lot of memory (90% CPU), while being bound to the DataTable takes up almost none.

Is this the correct behavior, or am I doing something wrong. What I'm trying to recreate basically is the GroupingTraderGridTest with a BindingList<> or List<> of custom objects (classes) that I have created.

Could somebody possibly post an example of how I would do this if it is possible?

Thanks a lot!

4 Replies

HA haneefm Syncfusion Team July 17, 2007 08:55 PM UTC

Hi Zach,

Here is a forum thread that discuss with the similar issue.
http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=63664

Best regards,
Haneef


ZA zach July 18, 2007 08:05 PM UTC

Thanks -

That helps a little but I'm not sure how to implement the INotifyPropertyChanged interface so that it works correctly.

I implement the interface and then raise the event when the BindingList's OnListChanged method is called.

Then when I declare an instance of the list, what do I set the event handler to?

If I tell the grid to do an update, this has the same effect on memory.

What do you suggest If I want to keep my memory usage down?

Thanks


ZA zach July 19, 2007 03:01 PM UTC

I found the example that implements INotifyPropertyChanged, but the PropertyChanged event in the example is never set to an EventHandler.

I've created my own test application and when I perform an update to an object nothing happens.

Should the grid add an event automatically because it supports PropertyChanged?

I've attached my sample application.

Thanks

RealtimeBindingList.zip


HA haneefm Syncfusion Team July 21, 2007 12:06 AM UTC

Hi Zach,

Thank you for your patience.

I am able to see the issue of refreshing the cells in a grid that you have mentioned here.I am currently working on this issue and will provide a workaround with a sample positively on Monday).

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon