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.

moving into cell in GridDataBoundGrid

Thread ID:





67776 Aug 29,2007 04:57 PM Aug 30,2007 02:36 PM Windows Forms 2
Tags: GridControl
Asked On August 29, 2007 04:57 PM

I am programming with c# visual studio 2005 and syncfusion 4.4

In GridDataBoundGrid,
When I enter the cell(with F2 key or Double click) and i move with arrow keys inside the cell,
when i arrive to end of the text with the cursor if i continue to move with the arrow keys to the same direction, i move to the
next cell.
How i can to move only inside the cell when i in edit mode,it means when i arrive to the end of the text with the cursor,
i want to prevent from the user the option to move to the next cell while it in the edit mode?


Rajagopal [Syncfusion]
Replied On August 29, 2007 06:12 PM

Hi Yuval,

Thanks for your interest in Syncfusion Products.

This can be achieved by handling the MoveCurrentCellDirection event of the grid. In the event handler, check for e.Direction and accordingly handle it. Please try the below code.

void gridDataBoundGrid1_MoveCurrentCellDirection(object sender, GridMoveCurrentCellDirectionEventArgs e)
GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
if ((e.Direction == GridDirectionType.Left || e.Direction == GridDirectionType.Right) && cc.IsEditing)
e.Handled = true;
e.Result = false;

Let me know if you have any other questions.

Have a nice time.

Replied On August 30, 2007 02:36 PM

Thank you very much
it's work


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.