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

How to detect the scrollbar ?

5 Answers 33 Views
GridView
This is a migrated thread and some comments may be shown as answers.
chih hsien
Top achievements
Rank 1
chih hsien asked on 09 Apr 2012, 08:05 AM
Hi,

Here is the my xaml code.
<
Window x:Class="WpfApp.MainWindow"
        Title="MainWindow" Height="200" Width="525"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
 
    <Grid x:Name="grid">
        <telerik:RadGridView Name="radGridView1" ItemsSource="{Binding DataList}" Grid.Row="1" />
    </Grid>
</Window>

I would like to know how to detect the scrollbar exist or not in gridview ?

5 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 09 Apr 2012, 08:07 AM
Hi,

 Can you post more info about your scenario? Why you want to do this?

Greetings,
Vlad
the Telerik team

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

0
chih hsien
Top achievements
Rank 1
answered on 09 Apr 2012, 10:07 AM
hi,

Here is the sample link.
http://dl.dropbox.com/u/26396054/WpfGridScrollbarDemo.rar

and reference pic.

Regards,
Clare
0
Vlad
Telerik team
answered on 09 Apr 2012, 10:10 AM
Hi,

 I'm still not sure why you want to do this. Can you clarify?

Greetings,
Vlad
the Telerik team

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

0
chih hsien
Top achievements
Rank 1
answered on 09 Apr 2012, 11:03 AM
Hi,

In fact, I have to resize the window's height and width prevent the scrollbar show.
Or any other suggestion can resize the window when gridview show scrollbar?
0
Vlad
Telerik team
answered on 09 Apr 2012, 11:54 AM
Hello,

 Usually the scrollbar is needed to scroll and virtualize the grid items however if you have small amount of items and you do not want any scrolling from the grid and virtualziation you can simply associate RadGridView with Grid RowDefinition with Auto height. In this case the grid will be measured with infinity height and you will not get any scrollbar. 

All the best,
Vlad
the Telerik team

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

Tags
GridView
Asked by
chih hsien
Top achievements
Rank 1
Answers by
Vlad
Telerik team
chih hsien
Top achievements
Rank 1
Share this question
or