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

Gridview (Scroll Bar Problem)

1 Answer 98 Views
GridView
This is a migrated thread and some comments may be shown as answers.
sam Aryan
Top achievements
Rank 1
sam Aryan asked on 08 Jun 2011, 04:23 PM
Hi

I'm having a weird issue with the grid view column  if you I'm using Width="*" i get a really long horizontal scroll bar.

Code:
  <ScrollViewer HorizontalScrollBarVisibility="Auto" BorderThickness="0" >
  <telerik:RadGridView Grid.Row="1" ScrollMode="Deferred"     RowIndicatorVisibility="Collapsed"   CanUserFreezeColumns="False"  ShowGroupPanel="False"  AutoGenerateColumns="False"  >
                    <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn Header="Name" Width="200"  />
                    <telerik:GridViewDataColumn Header="Phone" Width="*" />
                    </telerik:RadGridView.Columns>
                </telerik:RadGridView>
</ScrollViewer>

Thanks

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 09 Jun 2011, 11:48 AM
Hi sam Aryan,

When you place a RadGridView inside a ScrollViewer, the grid will be measured with infinity. This is why when you are using Width="*", you get this long scroll bar. 

You may reference this help link about RadGridView performance.

In order to avoid this problem, you may:
1. Use a fixed size to GridView's width
2. Do not use "*" for the column width
3. Do not use ScrollViewer

I hope that this answers your question.

Regards,
Didie
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
Tags
GridView
Asked by
sam Aryan
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or