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

DataGrid with long description hang when scrolling

3 Answers 195 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Cloud
Top achievements
Rank 1
Cloud asked on 14 Dec 2011, 12:19 PM
We have problems in scrolling datagrid with long description column. If the display value for a column is not too long, the scrolling is working properly. However if there is a long description shown in a column as shown in the attached screen, the screen will hang when scrolling in the datagrid and the WPF window cannot be recovered until closed and reopened. The no of records are not that large and are around 600 only. Below is the reference code. Please advice the solution.

style dictionary file

<

Style TargetType="{x:Type telerik:RadGridView}">

  <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>

  <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>

  <Setter Property="RowIndicatorVisibility" Value="Collapsed"/>

  <Setter Property="AutoGenerateColumns" Value="False"/>

  <Setter Property="AutoExpandGroups" Value="True" />

</Style>

 

<Style TargetType="{x:Type telerik:GridViewDataColumn}">  

  <Setter Property="TextWrapping" Value="Wrap" />

  <Setter Property="Width" Value="Auto" />

  <Setter Property="Header">

    <Setter.Value>

      <TextBlock TextWrapping="Wrap" />

    </Setter.Value>

  </Setter>

</Style>


xaml file

<

telerik:RadGridView Grid.Row="0"  ItemsSource="{Binding SearchResult, Mode=OneWay}" IsReadOnly="True" IsFilteringAllowed="True">

 <telerik:RadGridView.Columns>

     <telerik:GridViewDataColumn DataMemberBinding="{Binding Cost_Centre_Code}" Header="Cost Centre" Width="Auto"> </telerik:GridViewDataColumn>

...
  <
telerik:GridViewDataColumn DataMemberBinding="{Binding Description_Display}" Header="Description" Width="*"> </telerik:GridViewDataColumn>

  <telerik:GridViewDataColumn DataMemberBinding="{Binding DR}" Header="DR" TextAlignment="Right" HeaderTextAlignment="Right" Width="Auto"> </telerik:GridViewDataColumn>

    <telerik:GridViewDataColumn DataMemberBinding="{Binding CR}" Header="CR" TextAlignment="Right" HeaderTextAlignment="Right" Width="Auto"> </telerik:GridViewDataColumn>

</telerik:RadGridView.Columns>

</telerik:RadGridView>

 

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 16 Dec 2011, 01:05 PM
Hi,

 Can you post more info about your grid version? We are not sure also why you've set ScrollViewer.HorizontalScrollBarVisibility and ScrollViewer.VerticalScrollBarVisibility for the grid. Can you clarify?

Greetings,
Vlad
the Telerik team

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

0
Cloud
Top achievements
Rank 1
answered on 19 Dec 2011, 10:05 AM
We are using RadControls version v.2011.2.920.35.
I have tried to remove the properties 'ScrollViewer.HorizontalScrollBarVisibility' and 'ScrollViewer.VerticalScrollBarVisibility' but it still doesn't work. But we found that if 'AutoGenerateColumns' property is not set, the grid will work properly when scrolling. However we indeed need to disable the autogeneration since extra columns are now generated and we do have some specific format for each column. So is there any solution to solve that?
0
Vlad
Telerik team
answered on 19 Dec 2011, 12:43 PM
Hello ,

 We are still not sure what's the exact problem at your end however you can customize auto-generated columns using AutoGeneratingColumn event. You can even cancel adding of some column(s).

Regards,
Vlad
the Telerik team

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

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