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

Problem with caching values in GGC

Hi,

I have an issue with the GGC. I have an object called SomeObject which contains a string Name, a SomeType Type and a double DValue.

The grid is bound to a bindinglist and SomeObject implements INotifyPropertyChanged. When i change something in the SomeObject I fire the propertychanged event a expected. When something is changed on the internal SomeType object of SomeObject an event is fired that triggers the propertyChanged("SomeType") event to be fired in SomeObject.

This all was fine and the grid updates as expected when the values of SomeObject are changed programmatically.

Also, SomeType contains a property call Name that is shown in the grid and is accessed as column SomeType_Name. This name is linked to a dropdown list in the UI. When the user selects a name the internal value of SomeType_Name is changed appropriately.

When I change SomeType_Name from 'A' to 'B' as the name is changed fine in the grid. But the problem is that when i change the value from 'B' back to 'A'. the grid caches the previous value ('B') and doesnt show the new value. Is there any way to avoid this issue? Thanks



5 Replies

SR Sri Rajan Syncfusion Team September 10, 2008 01:12 PM UTC

Hi Jack,

Thank you for your interest in Syncfusion products.

You need to handle TableControlCurrentCellMoved event or TableControlCurrentCellCloseDropDown event, then set the property TableDirty as true and call the method EndEdit() to solve this issue.


void gridGroupingControl1_TableControlCurrentCellMoved(object sender, GridTableControlCurrentCellMovedEventArgs e)
{
this.gridGroupingControl1.Table.TableDirty = true;
this.gridGroupingControl1.Refresh();
this.gridGroupingControl1.Table.EndEdit();
}


TableDirty:
---------
This property indicates to the engine that it needs to re-categorize elements when the underlying datasource is updated.

Please let me know if this helps.

Best Regards,
Srirajan.




TE test September 12, 2008 12:19 PM UTC

This is how i used to do this in the very beginning but then i opted to use the INotifyProperty instead since it has some obvious advatnages. So now you are saying that I should actually do that with the grid.refresh method? I dont want to do that cause a) its slow b) it re-arranges the whole grid so any sorting, grouping is lost (the collapsed groups are getting expanded as well) and c) because when you pay for a product such as syncfusion you expect a decent solution to this kind of problems and not a 'quick fix'. So is there any other way that will update JUST this particular cell. The rest of them are fine

>Hi Jack,

Thank you for your interest in Syncfusion products.

You need to handle TableControlCurrentCellMoved event or TableControlCurrentCellCloseDropDown event, then set the property TableDirty as true and call the method EndEdit() to solve this issue.


void gridGroupingControl1_TableControlCurrentCellMoved(object sender, GridTableControlCurrentCellMovedEventArgs e)
{
this.gridGroupingControl1.Table.TableDirty = true;
this.gridGroupingControl1.Refresh();
this.gridGroupingControl1.Table.EndEdit();
}


TableDirty:
---------
This property indicates to the engine that it needs to re-categorize elements when the underlying datasource is updated.

Please let me know if this helps.

Best Regards,
Srirajan.






SR Sri Rajan Syncfusion Team September 17, 2008 05:15 AM UTC

Hi Jack,

Thank you for your interest in Syncfusion products.

Please try using Invalidate() method instead of Refresh() method to solve this issue. Here is the modified code.

void gridGroupingControl1_TableControlCurrentCellMoved(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellMovedEventArgs e)
{
this.gridGroupingControl1.Table.TableDirty = true;
this.gridGroupingControl1.Invalidate();
this.gridGroupingControl1.Table.EndEdit();
}


This issue got solve in the latest version. Here is the link.
http://www.syncfusion.com/downloads/latestversion/default.aspx

For unlock key email to salessupport@syncfusion.com

Best Regards,
Srirajan.



TE test September 18, 2008 04:10 PM UTC

Well its not as simple for us to update to the next version. The only thing I would like to know is why the grid ignores subsequent PropertyChanged events and how can i fix that.

thx

>Hi Jack,

Thank you for your interest in Syncfusion products.

Please try using Invalidate() method instead of Refresh() method to solve this issue. Here is the modified code.

void gridGroupingControl1_TableControlCurrentCellMoved(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellMovedEventArgs e)
{
this.gridGroupingControl1.Table.TableDirty = true;
this.gridGroupingControl1.Invalidate();
this.gridGroupingControl1.Table.EndEdit();
}


This issue got solve in the latest version. Here is the link.
http://www.syncfusion.com/downloads/latestversion/default.aspx

For unlock key email to salessupport@syncfusion.com

Best Regards,
Srirajan.





SR Sri Rajan Syncfusion Team September 20, 2008 09:33 AM UTC

Hi Jack,

Thank you for your interest in Syncfusion products.

It is hard to trace out the problem exactly without a working sample which reproduces this issue?. Is it possible for you to upload a minimal sample which reproduces this issue?. That will help us to analyze this issue further.

Please also try our latest version, because bindinglist issues was fixed in this version. Here is the link.

http://www.syncfusion.com/downloads/latestversion/default.aspx

For unlock key email to salessupport@syncfusion.com

Please let me know if this helps.

Best Regards,
Srirajan.



Loader.
Live Chat Icon For mobile
Up arrow icon