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.
Unfortunately, activation email could not send to your email. Please try again.

GridWrapBehaviour problem with disabled cells

Thread ID:

Created:

Updated:

Platform:

Replies:

12072 Mar 21,2004 06:01 PM Mar 22,2004 02:28 AM Windows Forms 1
loading
Tags: GridControl
Sue Harris
Asked On March 21, 2004 06:01 PM

Hi, I have a virtual grid with the GridWrapBehaviour set the WrapRow. My last row is set disabled, except for the first column. However, the grid will not wrap down to the last line. It appears that the wrap code checks the disabled state of the next rows same column before wrapping (ie the last column). How can I get the grid to wrap to the last line. (A simple example which demonstrates the problem is the QueryCellInfo has this code:) if ( this.gridControl1.RowCount == e.RowIndex ) { e.Style.Enabled = ( e.ColIndex <= 1 ); } Thanks, Sue

Administrator [Syncfusion]
Replied On March 22, 2004 02:28 AM

I think you can work around this problem by handling QueryNextCurrentCellPosition and explicitly setting teh currentcell in this case.
private void gridControl1_QueryNextCurrentCellPosition(object sender, GridQueryNextCurrentCellPositionEventArgs e)
{
	GridCurrentCell cc = this.gridControl1.CurrentCell;
	if(e.Direction == GridDirectionType.Down 
		&& cc.ColIndex == this.gridControl1.ColCount
		&& cc.RowIndex == this.gridControl1.RowCount - 1)
	{
		e.Handled = true;
		e.Result = true;
		cc.MoveTo(this.gridControl1.RowCount, 1);
	}
}

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.

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.

;