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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridGroupingControl: how to get column collection

Thread ID:

Created:

Updated:

Platform:

Replies:

53905 Dec 22,2006 10:22 AM UTC Dec 26,2006 11:00 AM UTC WinForms 4
loading
Tags: GridControl
UBS
Asked On December 22, 2006 10:22 AM UTC

Hi,

How to get column collection in GridGroupingControl. Like in DataGridBound

GridBoundColumnsCollection col = GridBoundColumns;

Regards
Vivek

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

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

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

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

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.

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

;