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

Sorting a column with virtualization turned on issue

1 Answer 66 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ali
Top achievements
Rank 1
Ali asked on 07 Oct 2011, 06:03 AM
Hi,

I have an issue where I have a column with a CellTemplate containing a vertical stackpanel and two child items. When I sort on this column, some of the rows turn up as blank. This only happens when row virtualization is turned on. I've tried giving the stackpanel a fixed height but that doesn't fix the issue.

<telerik:RadGridView x:Name="testGrid" EnableRowVirtualization="True" AutoGenerateColumns="False" Loaded="RadGridView_Loaded">
          <telerik:RadGridView.Columns>                          
              <telerik:GridViewDataColumn Header="Item 3" DataMemberBinding="{Binding Item3}">
                  <telerik:GridViewDataColumn.CellTemplate>
                      <DataTemplate>
                          <StackPanel Orientation="Vertical">
                              <TextBlock Text="{Binding Item3}" />
                              <TextBlock Text="{Binding Item3}" />
                          </StackPanel>
                      </DataTemplate>
                  </telerik:GridViewDataColumn.CellTemplate>
              </telerik:GridViewDataColumn>
          </telerik:RadGridView.Columns>
      </telerik:RadGridView>

1 Answer, 1 is accepted

Sort by
0
Ali
Top achievements
Rank 1
answered on 10 Oct 2011, 12:20 AM
I forgot to add that you have to scroll to the bottom of the grid view and then sort on a column for the issue to occur.
Tags
GridView
Asked by
Ali
Top achievements
Rank 1
Answers by
Ali
Top achievements
Rank 1
Share this question
or