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. Image for the cookie policy date
close icon

Virtual Tree Grid (Header names)

Hi,

How can i play with the headers of virtual tree grid? (i.e. changing header names, making them invisible etc)

Thanks,

2 Replies

AD Administrator Syncfusion Team February 9, 2007 08:24 PM UTC

Hi Adnan,

How can i play with the headers of virtual tree grid?
>>>>>>>>
You can handle the PrepareViewStyleInfo event of the grid and set the e.Style.Text to your header text. Here is a code snippet.

private void gridControl1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
{
if( e.RowIndex == 0 && e.ColIndex == 1)
{
e.Style.Text = "HeaderText";
}
}

making them invisible?
>>>>>>>>
You can handle the QueryColWidth event to hide column in a virtual grid. Here is a code snippet.

private void gridControl1_QueryColWidth(object sender, GridRowColSizeEventArgs e)
{
if(e.Index == 1)
{
e.Size = 0;
e.Handled =true;
}
}

Best regards,
Haneef


AS Adnan Sohail February 9, 2007 08:32 PM UTC

Thanks again!

Loader.
Live Chat Icon For mobile
Up arrow icon