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.

show hide grid grouping control column headers

Thread ID:

Created:

Updated:

Platform:

Replies:

68282 Sep 14,2007 04:31 PM Apr 13,2011 01:49 AM Windows Forms 2
loading
Tags: GridControl
abc
Asked On September 14, 2007 04:31 PM

I am using the attached code for show/hide of column in grid grouping control.

For showing and hiding, click on the 1st cell of the grid grouping control, a window pops up and the user can show and hide the columns...

My problem is when i am using show/Hide of columns....the default index of column changes....

ex my column sequence is
col1,col2,col3,col4
if i remove col2 and again add col2..now my column sequence changes to
col1,col3,col4,col2...

I want that on show/Hide of column the sequence should remain the same ie col1,col2,col3,col4
If i show and hide any column....column sequence should never change...

I will be really thankfull if anyone could help me in this..

GridGroupingColumnchooser_cb6481c4.zip

Rajagopal [Syncfusion]
Replied On September 17, 2007 10:31 PM

Hi Prabhjeet,

Instead of removing the column from the TableDescriptor.Columns collection, remove it from the from the TableDescriptor.VisibleColumns collection. Then when showing it back, you can use the TableDescriptor.VisibleColumns.Insert method. Please try the code below.

// to remove the column
this.gridGroupingControl1.TableDescriptor.VisibleColumns.Remove(item.Text);

// to show it back
int ctr = this.gridGroupingControl1.TableDescriptor.Columns.IndexOf(item.Text);
this.gridGroupingControl1.TableDescriptor.VisibleColumns.Insert(ctr, item.Text);

Let me know if this helps.

Regards,
Rajagopal

Jignesh H. Sodvadiya
Replied On April 13, 2011 01:49 AM

Hello,

I am using Syncfusion Grid Grouping Control. I now facing little bit of problem with this grid. I am binding only Datatable with Multiple level Grouping display summary on Group Header. But i want to hide some of Group Header from Grid. So how i can do it ?

Thanks & Regards
Jignesh Patel


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.

;