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.

Problem with caching values in GGC

Thread ID:

Created:

Updated:

Platform:

Replies:

76483 Sep 9,2008 05:54 AM Sep 20,2008 05:33 AM Windows Forms 5
loading
Tags: GridControl
test
Asked On September 9, 2008 05:54 AM

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



Sri Rajan [Syncfusion]
Replied On September 10, 2008 09:12 AM

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.



test
Replied On September 12, 2008 08:19 AM

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.





Sri Rajan [Syncfusion]
Replied On September 17, 2008 01:15 AM

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.


test
Replied On September 18, 2008 12:10 PM

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.




Sri Rajan [Syncfusion]
Replied On September 20, 2008 05:33 AM

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.



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.

;