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

GGC: Delay when adding relation before new columns are available

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?

4 Replies

AD Administrator Syncfusion Team 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.


AD Administrator Syncfusion Team 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.


AD Administrator Syncfusion Team 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.


SR Sigurd Ringbakken February 25, 2005 11:12 AM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon