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 table order and rebinding

Thread ID:

Created:

Updated:

Platform:

Replies:

71026 Jan 11,2008 05:22 PM Jan 23,2008 06:47 PM Windows Forms 2
loading
Tags: GridControl
Mark Atkinson
Asked On January 11, 2008 05:22 PM

I have a couple of questions/issues with the GCC

1) If I'm using a table/child hierarchical structure of business objects (data source is a BindingList which contains two child BindingLists), how can I control which child appears first in the drop down hierarchy?

2) I'm having a very hard time "refreshing" the grid after clearing and reloading the BindingList that is the DataSource. I've tried the "rebinding" type methods with about 80% success but there always seems to be painting problems afterwards. In my case, the columns in one of the child tables aren't big enough to show the full text. Here's the code from my ReBind method:

GridTableDescriptor outcomesDescriptor = GetTableDescriptor("Outcomes");
outcomesDescriptor.ResetColumns();
outcomesDescriptor.Reset();

GridTableDescriptor conditionsDescriptor = GetTableDescriptor("Conditions");
conditionsDescriptor.ResetColumns();
conditionsDescriptor.Reset();

ResetChildGroupOptions();
ResetTableDescriptor();
rules.Clear(); // the sata source, bindinglist
DataSource = null;
DataMember = null;
LoadRules();
BindGrid();



Mark Atkinson
Replied On January 21, 2008 06:12 PM

Can anyone help me with the first issue below?
If I'm using a table/child hierarchical structure of business objects (data source is a BindingList which contains two child BindingLists), how can I control which child appears first in the drop down hierarchy?


>I have a couple of questions/issues with the GCC

1) If I'm using a table/child hierarchical structure of business objects (data source is a BindingList which contains two child BindingLists), how can I control which child appears first in the drop down hierarchy?

2) I'm having a very hard time "refreshing" the grid after clearing and reloading the BindingList that is the DataSource. I've tried the "rebinding" type methods with about 80% success but there always seems to be painting problems afterwards. In my case, the columns in one of the child tables aren't big enough to show the full text. Here's the code from my ReBind method:

GridTableDescriptor outcomesDescriptor = GetTableDescriptor("Outcomes");
outcomesDescriptor.ResetColumns();
outcomesDescriptor.Reset();

GridTableDescriptor conditionsDescriptor = GetTableDescriptor("Conditions");
conditionsDescriptor.ResetColumns();
conditionsDescriptor.Reset();

ResetChildGroupOptions();
ResetTableDescriptor();
rules.Clear(); // the sata source, bindinglist
DataSource = null;
DataMember = null;
LoadRules();
BindGrid();





haneefm [Syncfusion]
Replied On January 23, 2008 06:47 PM

Hi Mark,

You can change order of the childtable by using the Relations collection in a GridTableDescriptor. Below are the codes:

int iRelationCount = this.gridGroupingControl1.TableDescriptor.Relations.Count;
GridRelationDescriptor[] rds = new GridRelationDescriptor[iRelationCount];
this.gridGroupingControl1.TableDescriptor.Relations.CopyTo( rds,0);
this.gridGroupingControl1.TableDescriptor.Relations.Clear();
for(int i = iRelationCount -1;i>=0;i--)
this.gridGroupingControl1.TableDescriptor.Relations.Add(rds[i]);
this.gridGroupingControl1.Reinitialize();

Best regards,
Haneef


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.

;