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

How can I make Column Header to cover two columns for Virtual Grid?

Thread ID:

Created:

Updated:

Platform:

Replies:

60992 May 16,2007 02:31 PM UTC May 16,2007 04:16 PM UTC WinForms 1
loading
Tags: GridControl
TOO1BEE
Asked On May 16, 2007 02:31 PM UTC

We are using virtual grid. Right now we are too far in the application process to use any other grid.

I have looked at several post and knowledge base articles but was not able to find any info on having column header cover 2 columns.

I looked at
http://www.syncfusion.com/Support/Forums/message.aspx?&MessageID=14991

I have a similar requirement but with "virtual" grid.

Is there a sample?

Help appreciated

Saravanan A [Syncfusion]
Replied On May 16, 2007 04:16 PM UTC

Hi TOO1BEE,

You can achieve this by having a covered cell in the column header that span over two columns. For that, you would have to subscribe to the QueryCoveredRange event and provide the covered range on demand.

Here is the code snippet to have a column header that covers first two columns.

//provide covered range on demand
void gridControl1_QueryCoveredRange(object sender, GridQueryCoveredRangeEventArgs e)
{
if (e.RowIndex == 0)
{
if (e.ColIndex >= 1 && e.ColIndex <= 2)
{
e.Range = GridRangeInfo.Cells(0, 1, 0, 2);
e.Handled = true;
}
}
}

Please refer to this sample: http://websamples.syncfusion.com/samples/Grid.Windows/F60992/main.htm

Best Regards,
Saravanan

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

;