This is a migrated thread and some comments may be shown as answers.

Need to retaine scrollBar at same position while changing itemsource.

1 Answer 32 Views
GridView
This is a migrated thread and some comments may be shown as answers.
dhanushkodi
Top achievements
Rank 1
dhanushkodi asked on 13 Mar 2015, 12:19 PM
I have display whether 10 or more records in RadGridView. then i can scroll down. in my functionality click checkBox after that RadGridView itemsource are assigned or refreshed Radgridview fully refreshed. in this situation i need to display previously scroll position.

Ex:
----
this.MedicalNoteHistoryGrid.ScrollIntoViewAsync(this.MedicalNoteHistoryGrid.Items[this.MedicalNoteHistoryGrid.Items.Count - 1],
                                                                      this.MedicalNoteHistoryGrid.Columns[this.MedicalNoteHistoryGrid.Columns.Count - 1],
                      new Action<FrameworkElement>((f) =>
                         {
                           (f as GridViewRow).IsSelected = true;
                        }

                     ));

i can try above the code display last index of gridview row. in my functionality how to get the scroll position.

Regards,
Dhanush.


1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 16 Mar 2015, 10:35 AM
Hi Dhanush,

You can try is to save the state of the ScrollViewer and apply it after you have reset RadGridView's ItemsSource. You can check the ScrollViewer In RadGridView forum thread where a similar question has already been discussed.

Regards,
Dimitrina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
GridView
Asked by
dhanushkodi
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or