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

Hiding empty columns with grid grouping control

Thread ID:





114703 Dec 4,2013 10:16 PM UTC Dec 16,2013 03:45 AM UTC WinForms 3
Tags: GridControl
Alexander Glass
Asked On December 4, 2013 10:16 PM UTC

I have a number of empty columns with my syncfusion grid grouping control.  After I load the grid, I would like to be able to loop through the grid, determine which columns are empty and then remove the from the visible columns list.  Is this possible to do with the grid grouping control?

Praveena P [Syncfusion]
Replied On December 11, 2013 05:34 AM UTC

Hi Alexander,

Thank you for your interest in Syncfusion products.

To loop through the GridGroupingControl columns make use of visiblecolumndescriptor collection and check the condition whether columns are empty in the loop.

 Please refer the below code:

foreach (GridVisibleColumnDescriptor visibleColumnDescriptor in gridGroupingControl1.TableDescriptor.VisibleColumns)
//condition for empty columns

To remove column from the visible columns list kindly make use of below code:




Alexander Glass
Replied On December 11, 2013 10:20 PM UTC

I'm trying to create a generic method for testing if all values in data[i, col] == null.  Can you help me understand how to access columns and the data stored in the column using row/column indices?

Praveena P [Syncfusion]
Replied On December 16, 2013 03:45 AM UTC

Hi Alexander,

Thanks for your update.

 To access data stored in the column, kindly make use of  the TableModel which support for retreiving data from datasource .Using cellvalue property you can get the data of the specific cell.


if (gridGroupingControl1.TableModel[1, 2].CellValue == "")



Please let me know if you have any concerns.




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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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