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

Setting the selected row

Thread ID:





1170 Sep 30,2002 11:18 AM UTC Oct 2,2002 08:37 AM UTC WinForms 3
Tags: GridControl
Administrator [Syncfusion]
Asked On September 30, 2002 11:18 AM UTC

I have a grid with 2 rows and 5 columns. In column 2 and 4 the cell are enabled, so that the user can enter a value. I'd like to be able to set the selected row, so that when the user hits the 'Enter' key at position 1,4 the next selected row is 2,2... Getting from 1,2 to 1,4 is no problem - I've set the EnterKeyBehavior to Right. I've tried using the Move-method of CurrentCell, but I can't get it to work.

Administrator [Syncfusion]
Replied On September 30, 2002 12:45 PM UTC

In the version Essential Grid, there is a property setting that gets you this behavior if your right-most column is enabled. That setting is this.gridControl1.Model.Options.WrapCell = true; But in your case, it appears that your right-most column is disabled. So, setting the above property will not get you the desired behavior. Instead you will have to handle this process yourself. In the attached project, there is a derived grid that implements this process.

Administrator [Syncfusion]
Replied On October 1, 2002 11:35 AM UTC

Perfect... almost :) If I set the ActiveCurrentCellBehaviour-property to SelectAll then the next selected cell always becomes the one i column 2 (ie. it work fine, when jumping from column 4 to 2, but not from column 2 to 4...) Besides that! Simply perfect!

Administrator [Syncfusion]
Replied On October 2, 2002 08:37 AM UTC

Try this. 1) Comment out the ProcessKeyPreview override. 2) In the MoveToNextCell override, there is an if-statement that starts if(!b1). Add an else clause as here:
	this.CurrentCell.MoveTo(row, col, 
	b = true;


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

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

Live Chat Icon For mobile
Live Chat Icon