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

GGC: Delay when adding relation before new columns are available

Thread ID:





25332 Feb 24,2005 03:29 PM UTC Feb 25,2005 11:12 AM UTC WinForms 4
Tags: GridControl
Sigurd Ringbakken
Asked On February 24, 2005 03:29 PM UTC

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 05:48 PM UTC

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 07:08 PM UTC

>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 07:46 PM UTC

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 11:12 AM UTC

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


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon