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
close icon

moving into cell in GridDataBoundGrid

Hi,
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?

Thanks,
Yuval

2 Replies

RA Rajagopal Syncfusion Team August 29, 2007 10:12 PM UTC

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.
Regards,
Rajagopal


YU Yuval August 30, 2007 06:36 PM UTC

Thank you very much
it's work

Loader.
Live Chat Icon For mobile
Up arrow icon