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: Delay when adding relation before new columns are available

Thread ID:

Created:

Updated:

Platform:

Replies:

25332 Feb 24,2005 10:29 AM Feb 25,2005 06:12 AM Windows Forms 4
loading
Tags: GridControl
Sigurd Ringbakken
Asked On February 24, 2005 10:29 AM

I''m having trouble when trying to access columns that are added to my table through a ForeignKeyReference-relation. Example: I add a relation to a child table containing the field "Message". The relation is named "rel". //Add relation myGrid.TableDescriptor.Relations.Add(myRel); //Remove all visible columns myGrid.TableDescriptor.VisibleColumns.Clear(); if( myGrid.TableDescriptor.Columns.Contans("rel_Message") ) { myGrid.TableDescriptor.Columns["rel_Message"].HeaderText = "Message"; myGrid.TableDescriptor.VisibleColumns.Add("rel_Message"); } If I put a break-point in the first line and steps over it, the new column is added and available in the TableDescriptor.Columns - collection. If I don''t put a breakpoint there, the column is not available immediately. What is the solution to this problem?

Administrator [Syncfusion]
Replied On February 24, 2005 12:48 PM

After adding the columns, try setting this.gridGroupingControl1.Table.CountersDirty = true; to see if that takes care of this problem.

Administrator [Syncfusion]
Replied On February 24, 2005 02:08 PM

>After adding the columns, try setting > >this.gridGroupingControl1.Table.CountersDirty = true; > >to see if that takes care of this problem. Unfortunately it didn''t. Same behaviour.

Administrator [Syncfusion]
Replied On February 24, 2005 02:46 PM

Does calling myGrid.TableDescriptor.Columns.LoadDefault() help? Stefan > > >>After adding the columns, try setting >> >>this.gridGroupingControl1.Table.CountersDirty = true; >> >>to see if that takes care of this problem. > >Unfortunately it didn''t. >Same behaviour.

Sigurd Ringbakken
Replied On February 25, 2005 06:12 AM

>Does calling >myGrid.TableDescriptor.Columns.LoadDefault() > >help? That helped! Thank You! :-) regards, sigurd

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.

;