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

Problem with covered header cells in virtual grid

Thread ID:





30214 Jun 14,2005 10:35 AM UTC Jun 14,2005 11:39 AM UTC WinForms 2
Tags: GridControl
Holger Persch
Asked On June 14, 2005 10:35 AM UTC

Hi, I experienced a problem with covered cells in the header row when using the grid in virtual mode. I''m using the QueryCoveredRange event to cover each four cells in the header row to one cell. Now, if the the mouse cursor is moved over one of these cells (except of every first cell in the covered range) then the underlaying cell is activated and breaks the covered cell''s text. If the mouse cursor is moved to the first cell in the covered range then the cell gets redrawn and everything looks fine. How to get rid of this? I attached a zip-file containing a sample project and a screenshot to this post. Thanks in advance Holger Persch VirtualGridTest_2037.zip

Administrator [Syncfusion]
Replied On June 14, 2005 11:18 AM UTC

When you use QueryCoveredRange, any time e.RowIndex and e.COlIndex point yo any cell in a desired covered range, you must explicilty specify the range. (ie, you just do not specify the range for the top-left cell, instead you need to specify the range for every cell in the range). So, try this code (I may have the arithmetic wrong, but it shows the idea.)
private void gridControl1_QueryCoveredRange(object sender, GridQueryCoveredRangeEventArgs e)
	e.Handled = false;
	if (e.RowIndex == 0 && e.ColIndex > 0)
		int start = 4 * ((e.ColIndex - 1) / 4) + 1;
		e.Range = GridRangeInfo.Cells(0, start, 0, start + 3);
		e.Handled = true;

Holger Persch
Replied On June 14, 2005 11:39 AM UTC

Hi, Your code works perfectly and mine now too :-) Thanks Holger


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

or the page will be automatically redirected to 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