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

[Solved] Auto Scroll

4 Answers 191 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Eduardo
Top achievements
Rank 1
Eduardo asked on 27 Apr 2009, 05:25 PM
Why when I Select a record (row) in the grid, it don't auto scroll, turn the record visible?
How do I make it?

4 Answers, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 28 Apr 2009, 06:39 AM
Hello Eduardo,

This is the default behavior but you can easily scroll to the selected item by calling BringDataItemIntoView method.
If there is enough demand we may change this behavior.
Thanks for the feedback.

Do not hesitate to contact us in case you have further questions.

Best wishes,
Hristo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Eduardo
Top achievements
Rank 1
answered on 28 Apr 2009, 11:14 AM
do you have an examplo this?
0
Eduardo
Top achievements
Rank 1
answered on 28 Apr 2009, 11:39 AM
I tryed it:

grid.ItemsControl.BringRecordIntoView(grid.SelectedRecord);

my grid has records and a selected record, but it return out of range exception
why?

0
Hristo
Telerik team
answered on 28 Apr 2009, 12:23 PM
Hello Eduardo,

Here is a snippet on how to scroll into view the selected item:
radGridView1.SelectedItem = dt.Rows[20];  
radGridView1.BringDataItemIntoView(dt.Rows[20]); 
where dt is DataTable field with more then 20 rows. The DataTable is set as ItemsSource on radGridView.
This is WPF example (because there is no DataTable class in Silverlight) but the principe is the same.
Just get the reference to the item that you want to select, set it as SelectedItem and call BringDataItemIntoView method with this object.

Let us know if you need more help.

All the best,
Hristo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Eduardo
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Eduardo
Top achievements
Rank 1
Share this question
or