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

GridGroupingControl jump to top after sorting a column

Hello I would like to sort a column and after the sorting is done focus should go back to the top instead currently it is where it was when sort event occured and user has to manually scroll to the top.
 
Thank you

4 Replies

AK Arun Kumar V Syncfusion Team February 11, 2013 11:57 AM UTC

Hi Gaukhar Massabayeva,

Thanks for your interest in Syncfusion products.

Query:

sorting is done focus should go back to the top

You can customize the current cell to be moved to the top cell or other cell you wanted by using the following  currentcell.moveto method.

Please make use of the following code and let me know if the issue is solved.

this.gridGroupingControl1.TableControl.CurrentCell.MoveTo(2, 2, GridSetCurrentCellOptions.SetFocus);

You can make use of the following sortedcolumns changed event.

Please let me know if you have any other concerns.

Regards,

Arun.



TR TrySyncfusion replied to Arun Kumar V July 15, 2016 03:23 AM UTC

Hi Gaukhar Massabayeva,

Thanks for your interest in Syncfusion products.

Query:

sorting is done focus should go back to the top

You can customize the current cell to be moved to the top cell or other cell you wanted by using the following  currentcell.moveto method.

Please make use of the following code and let me know if the issue is solved.

this.gridGroupingControl1.TableControl.CurrentCell.MoveTo(2, 2, GridSetCurrentCellOptions.SetFocus);

You can make use of the following sortedcolumns changed event.

Please let me know if you have any other concerns.

Regards,

Arun.


It works, but why MoveTo(2,2) ? Does (2,2) point to the top-left cell ? 


NI Nicolas July 18, 2016 05:04 AM UTC

I believe not, I think it should be 1,1, else you can try 0,0, it seems like an arbitrary coordinate for the example. You can move the focus anywhere on the grid with this method - Nicolas


PM Piruthiviraj Malaimelraj Syncfusion Team July 18, 2016 12:11 PM UTC

Hi Customer, 

The top left cell indices may be differed due to sample customization. If the grid has CaptionRow and GroupDropArea, the top cell indices will be changed. You can move the current cell focus to anywhere on grid using MoveTo method of CurrentCell. Please let us know if you have any queries. 

Regards, 
Piruthiviraj 


Loader.
Live Chat Icon For mobile
Up arrow icon