Gridview (Scroll Bar Problem)

2 posts, 0 answers
  1. sam Aryan
    sam Aryan avatar
    24 posts
    Member since:
    Feb 2010

    Posted 08 Jun 2011 Link to this post

    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

  2. Dimitrina
    Admin
    Dimitrina avatar
    3148 posts
    Member since:
    Sep 2014

    Posted 09 Jun 2011 Link to this post

    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

  3. Download a free trial of UI for WPF
Back to Top