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.
Unfortunately, activation email could not send to your email. Please try again.

GGC: Refreshing Cellvalue from a BusinessObject

Thread ID:

Created:

Updated:

Platform:

Replies:

68741 Oct 1,2007 02:04 AM Oct 1,2007 11:15 AM Windows Forms 3
loading
Tags: GridControl
Falk
Asked On October 1, 2007 02:04 AM

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

Administrator [Syncfusion]
Replied On October 1, 2007 09:23 AM

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

Falk
Replied On October 1, 2007 10:48 AM

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

Administrator [Syncfusion]
Replied On October 1, 2007 11:15 AM

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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;