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

GGC: Refreshing Cellvalue from a BusinessObject

Hi!

I have a ggc and its datasource is bound to a List of businessobjects.

Now I change a propertyvalue of one of the businessobjects via code - but the ggc does not refresh - either if I call ggc.Refresh or ggc.Table.Reload. How can I manage this ?


Regards
Falk

3 Replies

AD Administrator Syncfusion Team October 1, 2007 01:23 PM UTC

The list object that holds your business objects must raise some kind of change notification event in order for the grid to know that it needs to refresh itself.

For example, if your list supports IBindingList and your business objects supports some change interface like INotifyPropertyChanged, then the GridGroupingControl should automatically refresh the modified row. But if your business object does not support a changed interface but your list does support IBindingList, then you can explicitly raise the item reset event when you change your object. Here is a little sample.

http://www.syncfusion.com/Support/user/uploads/WindowsApplication16_5dfceef3.zip


FA Falk October 1, 2007 02:48 PM UTC

Hello Clay,

thanks for your answer.
Unfortunately this seems not to work in my App. My Datasource is a BindingList now. If I call BindingList.ResetItem(myBusinessObj), the ggc seems to receive an event, but the new data are not displayed. When I select the changed Record, the changed values are displayed. (ListBoxSelectionMode = One). When I select another record, the old values are displayed.

Unfortunately I can't send you any sample.

Do you have any ideas?




Thanks
Falk


AD Administrator Syncfusion Team October 1, 2007 03:15 PM UTC

Are you using the more recent (5.2.x) libraries? Earlier versions (prior to 4.4.0.55) had some problems here.

You might try using different settings for grid.UseOldListChangedHandler to see if this affects this behavior for you.

I assume the sample that I posted works ok for you. You might try changing it to more closely reflect what you are doing to see if you can break the sample's behavior.

One thing you can do is to add your own listener to the BindingList.ListChanged event and make sure all the proper events are being raised as you make your changes in your business object. This is the kind of thing we would do here if you provided us with a sample showing the problem.

Loader.
Live Chat Icon For mobile
Up arrow icon