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

arrow keys not working with covered ranges

Hi, I have a virtual grid, where we implement covered ranges for some of the rows - the grid columns are monthly, but some rows are show as quarterly or yearly so they are a series of covered ranges of either 3 months or 12 months. If I use the left or right arrow keys in a non-covered range when you get to the last visible column it scrolls the view to the next window. The problem with the covered ranges is that the arrow keys don''t scroll - the arrow keys only keep you in the visible screen. Any suggestions on how to get this to work? Thanks, Corinne

3 Replies

AD Administrator Syncfusion Team June 1, 2004 08:43 AM

I am not sure I understand what you need. "when you get to the last visible column it scrolls the view to the next window." Does this mean you want the focus to move to another control on your form? Or do you want it to move to another cell in your grid? In either case, you might try handling the grid''s QueryNextCurrentCellPosition event, and in the handler if you are on this covered cell, then explicitly set the focus to another control or call another cell or ???. This event gives you the chance to control how the current cell moves. If you handle things, set e.handled = true and e.Result to true or false, depending upon whether the currentcell was successfully moved.


CM Corinne Muir June 1, 2004 11:42 AM

Sorry for the confusion - when there are covered ranges I can''t scroll the grid past the visible range using the arrow keys. I can scroll the grid past the visible range when I am on a row that does not have covered ranges. Any idea how to get the arrow keys when on cells that have covered ranges to scroll the grid? thanks, Corinne


AD Administrator Syncfusion Team June 2, 2004 03:21 AM

This behavior is by design. But you can change it by handling the QueryNextCurrentCellPosition. Here is one try at doing this.
private void gridControl1_QueryNextCurrentCellPosition(object sender, GridQueryNextCurrentCellPositionEventArgs e)
{
	if(e.ColIndex > this.gridControl1.ColCount && e.Direction == GridDirectionType.Right
		&& this.gridControl1.ViewLayout.LastVisibleCol <= this.gridControl1.ColCount)
	{
		this.gridControl1.LeftColIndex += 1;
		e.Handled = true;
		e.Result = false;
	}
}

Loader.
Live Chat Icon For mobile
Up arrow icon