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

WrapCellBehavior - same row

Thread ID:





77161 Oct 16,2008 11:04 PM UTC Oct 17,2008 03:20 PM UTC WinForms 2
Tags: GridControl
Administrator [Syncfusion]
Asked On October 16, 2008 11:04 PM UTC

Is there a way to control tabbing in a GridDataBoundGrid so that when the user is in the last column in any row and presses the Tab key, he/she is sent to the first cell in the same row?
And, similarly, if the Shift+Tab keys are pressed and they are in the first cell, they go to the last cell in the same row?

I was hoping that one of the enums for WrapCellBehavior might be something like WrapCurrentRow.

Thanks for any help on this,

Rajadurai C [Syncfusion]
Replied On October 17, 2008 11:13 AM UTC

Hi Mark,

Thanks for your interest in Syncfusion products.

Please try the following code in CurrentCellKeyDown event handler in GridDataBoundGrid to achieve this feature.

//assuming grid containing 'n' columns

GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
if(e.Shift == false && e.KeyCode == Keys.Tab && cc.ColIndex == n)
e.Handled = true;
else if(e.Shift == true && e.KeyCode == Keys.Tab && cc.ColIndex == 1)
e.Handled = true;


Administrator [Syncfusion]
Replied On October 17, 2008 03:20 PM UTC

That works great! Thanks for your help.



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