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

MoveCurrentCell after editing

Hello,

last year I have posted a question about navigating to a cell after editing. This was the issue "Navigation to another cell".

You proposed to use the function 

ActiveGrid.CurrentCell.MoveCurrentCell(new Cell)

I did that and in most cases it works.

But when the cell that is edited is almost hidden or the cell where I would like to move to is hidden a call to MoveCurrentCell returns false and the new cell is not selected. Even if I use the call with the forceMove set to true the cell is not moved. This is the code I have used. The ScrollToView does not change anything.

RowColumnIndex rowColIdx = new RowColumnIndex(Sheet.ActiveGrid.CurrentCell.RowIndex + 1, 1);
this.Sheet.ActiveGrid.ScrollInView(rowColIdx);
if (Sheet.ActiveGrid.CurrentCell.MoveCurrentCell(rowColIdx, true) == true)
{
Debug.WriteLine($"NavigateToNextRow cell {Sheet.ActiveGrid.CurrentCell.RowIndex} and {Sheet.ActiveGrid.CurrentCell.ColumnIndex} done");
}
else
{
Debug.WriteLine($"NavigateToNextRow cell MoveCurrentCell returned false. Not moved");
}

Why does the MoveCurrentCell works only when the destination cell and the edited cell are visible?

How can I solve this? Because navigation is one of the key features this makes the app unusable for large sheets, therefore any help is highly appreciated.

Kind regards

Frank


 


1 Reply

VS Vijayarasan Sivanandham Syncfusion Team December 7, 2022 06:01 PM UTC

Hi Frank,

We have checked the cell navigation in the last or hidden row in SfSpreadSheet. Here, we have attached the tested sample and a video demo for your reference. Please have a look at this. Could you please confirm if we missed anything? If you are still facing the reported issue, modify the attached sample and share the video illustration of the reported issue. It will be helpful for us to check on it and provide you with a solution as soon as possible.

Regards,
Vijayarasan S


Attachment: Sample_And_Video_Demo_1675708d.zip

Loader.
Up arrow icon