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 columns dynamically, depending on row bieng clicked.

Thread ID:





72971 Apr 14,2008 09:51 AM UTC Apr 17,2008 03:15 PM UTC WinForms 1
Tags: GridControl
Asked On April 14, 2008 09:51 AM UTC


I am using DGBG Tree Lines Grid.

Is it possible to hide specific columns in the grid, depending, which row has been clicked or selected.

Could you please append any sample code if exist.

Administrator [Syncfusion]
Replied On April 17, 2008 03:15 PM UTC

Hi Raul,

Thanks for the interest in Syncfusion prodcuts.

You can handle CellClick Event and check for a particular RowIndex and Hide the Column using HideCols properties. Please refer the following code snippet that shows how you can hide columns when a Row is clicked.

private void gridDataBoundGrid1_CellClick(object sender, GridCellClickEventArgs e)
if (e.RowIndex == 9)
this.gridDataBoundGrid1.Model.HideCols[1] = true;
this.gridDataBoundGrid1.Model.HideCols[4] = true;

Please refer the sample in the below link that illustrates the above.


Please let me know if you have any questions.



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