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.

GridGroupingControl: how to get column collection

Thread ID:

Created:

Updated:

Platform:

Replies:

53905 Dec 22,2006 05:22 AM Dec 26,2006 06:00 AM Windows Forms 4
loading
Tags: GridControl
UBS
Asked On December 22, 2006 05:22 AM

Hi,

How to get column collection in GridGroupingControl. Like in DataGridBound

GridBoundColumnsCollection col = GridBoundColumns;

Regards
Vivek

Administrator [Syncfusion]
Replied On December 22, 2006 05:51 AM

Hi Vivek,

Use the TableDescriptor.Columns property to get column collection in a GridGroupingGrid. Here is a code snippet.

GridColumnDescriptorCollection columns = this.gridGroupingControl1.TableDescriptor.Columns;

Best Regards,
Haneef

UBS
Replied On December 22, 2006 06:17 AM

Hi,
wht is the replacment of this code Binder.InternalColumns; for GridGroupingControl

Regards
Vivek

>Hi Vivek,

Use the TableDescriptor.Columns property to get column collection in a GridGroupingGrid. Here is a code snippet.

GridColumnDescriptorCollection columns = this.gridGroupingControl1.TableDescriptor.Columns;

Best Regards,
Haneef

UBS
Replied On December 22, 2006 06:58 AM

Hi,

Actually I have to achieve this functionality into GridGroupingControl, below mentioned code is for GridDataBoundGrid

GridBoundColumnsCollection col = GridBoundColumns;

if (col.Count == 0)
col = Binder.InternalColumns;

Regards
Vivek

Administrator [Syncfusion]
Replied On December 26, 2006 06:00 AM

Hi Vivek,

For the GridGroupingGrid, there are two different ways to get the column collection in a Grid. One for managing the visible columns in a grid. Another one for managing the bounded columns in a grid. Here is a code snippet

GridColumnDescriptorCollection columns = this.grid.TableDescriptor.Columns;

GridVisibleColumnDescriptorCollection columns = this.grid.TableDescriptor.VisibleColumns;

>>>> GridBoundColumnsCollection col = GridBoundColumns;
>>>>
>>>> if (col.Count == 0)
>>>> col = Binder.InternalColumns;

In the above code snippet, the Binder.InternalColumns and GridBoundColumns specify bounded columns in a GridDataBoundGrid. You can use the TableDescriptor.Columns to access the bounded column in a groupinggrid.

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.

;