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

Access RadGridView Scrollbar

6 Answers 173 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 22 Apr 2010, 04:12 PM
I need to access the verticle scrollbar within the RadGridView control. All the search results I have found seem to not be supported in the latest version. As an example the snipet below is not working because ItemsControl is no longer supported.

 

 

 

var verticalScrollBar2 = (ScrollBar)this.RadGridView2.ItemsControl.GetChildByName("PART_VerticalScrollBar"); 

Can anyone share an example on how to access the scrollbar in the latest version?

Thanks

 

 

 

 

 

 

 

 

6 Answers, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 23 Apr 2010, 06:51 AM
Hi,

You can check the code in this blog post.

Best wishes,
Vlad
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Eric
Top achievements
Rank 1
answered on 23 Apr 2010, 04:53 PM
Thank you for the response Vlad. Is there a more straight forward example on accessing the scrollbar without the custom code for DomainDataSource? I just need to capture the scroll changed event.
0
Vlad
Telerik team
answered on 26 Apr 2010, 07:38 AM
Hi Eric ,

The code for accessing the scrollbar in my demo is not dependent on DomainDataSource. You need only SizeChanged event handler with our powerful extension methods (ChildrenOfType<>()).

Kind regards,
Vlad
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Eric
Top achievements
Rank 1
answered on 26 Apr 2010, 02:36 PM
Hi Vlad

I got it to work based on your example.

Thanks!
0
Timothy Kelley
Top achievements
Rank 1
answered on 29 Dec 2011, 03:52 PM
Can you please post a simple example?
Just a couple of lines of code to get at the ScrollChanged event please.

Tim
0
Maya
Telerik team
answered on 30 Dec 2011, 08:00 AM
Hi Timothy,

You can get ScrollBar/s as follows:

var scrollBars = this.gridchetoPesho.ChildrenOfType<ScrollBar>();
var scrollBar = this.gridchetoPesho.ChildrenOfType<ScrollBar>().FirstOrDefault();

Please take a look at this blog post for further reference.

Kind regards,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Eric
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Eric
Top achievements
Rank 1
Timothy Kelley
Top achievements
Rank 1
Maya
Telerik team
Share this question
or