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 : Nov 16th 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:

Created:

Updated:

Platform:

Replies:

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

Hi,

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.

http://websamples.syncfusion.com/samples/Grid.Windows/F72971/main.htm


Please let me know if you have any questions.

Regards,
Asem.



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

;