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

scrollign with another button

1 Answer 9 Views
GridView
This is a migrated thread and some comments may be shown as answers.
mehmet
Top achievements
Rank 1
mehmet asked on 22 Jul 2013, 08:41 AM
hi everyone ;

I we all know I can scroll the gridview with its scrolling properties  easily. 
But mu issue is that I try to make this scrolling by button click event.

I got another button in a usercontrolland I wanna scroll the gridview by clicking another button.


Thx in advance ..

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 22 Jul 2013, 08:55 AM
Hello,

You could get a reference af the GridViewScrollViewer and then scroll to the offset you want to.
For example, your code would look like:

var sw = grid.ChildrenOfType<GridViewScrollViewer>().FirstOrDefault();
if (sw != null)
{               
    double currentOffset = sw.VerticalOffset;
    sw.ScrollToVerticalOffset(currentOffset + additionalOffset);               
}

 

Regards,
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
GridView
Asked by
mehmet
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or