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.
Syncfusion Feedback

GridGroupingControl - Engine InitializeFrom Error

Thread ID:

Created:

Updated:

Platform:

Replies:

54096 Dec 29,2006 01:04 PM UTC Jan 4,2007 12:22 PM UTC Windows Forms 2
loading
Tags: GridControl
Badri Rajani Kanth
Asked On December 29, 2006 01:04 PM UTC

Hi,

We are using v 4.2.0.37.

We are saving the grid settings using "WriteXmlSchema()" method. Later, we are applying the SAVED grid settings along with some other column additions/removals on grid.

While we are applying the SAVED grid settings, we are creating a temporary engine object using "GridEngine.CreateFromXml()", making changes to the temporary engine TableDescriptor.Columns and TableDescriptor.VisibleColumns collections. (We can't avoid this temp engine and column collections updating.) And then we are Initializing the grid control with this temporary grid engine.

But the line gridGroupingControl.Engine.InitializeFrom(tempEngine); is some times throwing the error like {"Item has already been added. Key in dictionary: '' Key being added: 'COLUMN NAME'"}.

So, I guess, some kind of cleaning up is required on gridGroupingControl.Engine before/while Initializing.

Do we need to call any other method/set properties for Initializing?

Can you plz look into this?

Rgds
Rajani Kanth

Administrator [Syncfusion]
Replied On January 3, 2007 05:13 AM UTC

Hi Rajani,

Before intialize the Engine, you need to clear the Bounded columns in a grid by calling the TableDescriptor.Columns.Clear() method. Here is a code snippet

this.gridGroupingControl1.Engine.TableDescriptor.Columns.Clear() ;

Best Regards,
Haneef

Badri Rajani Kanth
Replied On January 4, 2007 12:22 PM UTC

Excellent! Working fine.

Thank You Very Much Haneef.

Rgds
Rajani Kanth

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.

Warning Icon 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.Close Icon

;