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.

GridGrouping Control and Primary Key Column

Thread ID:

Created:

Updated:

Platform:

Replies:

57691 Mar 8,2007 11:50 AM Mar 9,2007 10:01 AM ASP.NET Web Forms (Classic) 2
loading
Tags: GridGroupingControl
Administrator [Syncfusion]
Asked On March 8, 2007 11:50 AM

Hi,

For a GridGrouping Control, to bind the data to the control, I have to specify the Primary Key otherwise the data doesn't get binded to the GGC.

GridGroupControl1.TableDescriptor.PrimaryKeyColumns.Add("Field1");

In my application, the tablename is constructed in the code, so I don't know what is the field names to specify as the PrimaryKey Column.

Is there a way to specify the column number rather than the name of the table column as the Primary Key Column for the GGC?

If not, what alternatives do I have?

Thanks,

Monica

Gokul B [Syncfusion]
Replied On March 8, 2007 08:38 PM

Hi Monica,

You can specify the column number rather than the name of the column name as the PrimaryKey using below code snippet.

//Gets the Name of the column from the specific Index
String str = this.GridGroupingControl1.TableDescriptor.Columns[0].Name;
this.GridGroupingControl1.TableDescriptor.PrimaryKeyColumns.Add(str);

Let us know if you have any other queries.

Thanks for using Syncfusion products.

Regards,
Gokulkumar.B

Administrator [Syncfusion]
Replied On March 9, 2007 10:01 AM

Hi Gokulkumar,

Thank you!!

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.

;