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

[Solved] Single grid row when filtered causes cells to disappear when scrolling

2 Answers 160 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Chuck
Top achievements
Rank 1
Chuck asked on 26 Jul 2011, 02:39 PM
We have discovered yet another issue with cell redraw when using virtualization and row filters.
We have a style selector on a cell. We have many columns of data and therefore enable column virtualization. When only a single row is selected in the filter, the cell will not repaint when you scroll back and forth. Any moving of the column will cause it to repaint. If you have more than one row, the problem does not exist. We have had numerous issues surrounding this. We have tried every version of nightly builds as well. Some would show blanks when grouping, others would randomly disappear when scrolling.
This version seems to be the closest to stable with this one issue.
Please help!
Able to reproduce in example project from telerik. Just add more columns to the style selector example:
<Examples:GridViewExample x:Class="Telerik.Windows.Examples.GridView.Selectors.StyleSelectors.CellStyleSelector.Example"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:Examples="clr-namespace:Telerik.Windows.Examples"
  xmlns:telerikQuickStart="clr-namespace:Telerik.Windows.Controls.QuickStart;assembly=Telerik.Windows.Controls"
        VerticalAlignment="Center" HorizontalAlignment="Center">
   
    <telerikQuickStart:QuickStart.ExampleHeader>
        <TextBlock Text="Cell Style Selector" Margin="8" />
    </telerikQuickStart:QuickStart.ExampleHeader>
   
    <Grid>
        <Grid.Resources>
            <Style x:Key="HighUnitPriceStyle" TargetType="telerik:GridViewCell">
    <Setter Property="Background" Value="#7F2FB3FD" />
            </Style>
            <Style x:Key="LowUnitPriceStyle" TargetType="telerik:GridViewCell" />
            <Examples:UnitPriceConveter x:Key="converter" />
            <Examples:ConditionalStyleSelector x:Key="selector" ConditionConverter="{StaticResource converter}">
                <Examples:ConditionalStyleSelector.Rules>
                    <Examples:ConditionalStyleRule Style="{StaticResource HighUnitPriceStyle}">
                        <Examples:ConditionalStyleRule.Value>
                            <sys:Boolean>True</sys:Boolean>
                        </Examples:ConditionalStyleRule.Value>
                    </Examples:ConditionalStyleRule>
                    <Examples:ConditionalStyleRule Style="{StaticResource LowUnitPriceStyle}">
                        <Examples:ConditionalStyleRule.Value>
                            <sys:Boolean>False</sys:Boolean>
                        </Examples:ConditionalStyleRule.Value>
                    </Examples:ConditionalStyleRule>
                </Examples:ConditionalStyleSelector.Rules>
            </Examples:ConditionalStyleSelector>
        </Grid.Resources>
  <Border telerikQuickStart:ThemeAwareBackgroundBehavior.IsEnabled="True" Grid.RowSpan="3" />
        <telerik:RadGridView x:Name="RadGridView1" ItemsSource="{Binding Products}" EnableRowVirtualization="True"  AutoGenerateColumns="False" MinHeight="386" MaxHeight="500" Width="700"
                          CanUserFreezeColumns="False" RowIndicatorVisibility="Collapsed">
                            
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="ID" DataMemberBinding="{Binding ProductID}" />
                <telerik:GridViewDataColumn Header="Product Name" DataMemberBinding="{Binding ProductName}"/>
                <telerik:GridViewDataColumn Header="Unit Price" DataMemberBinding="{Binding UnitPrice}" DataFormatString="{}{0:c}"
                                            CellStyleSelector="{StaticResource selector}" />
                <telerik:GridViewDataColumn Header="Units In Stock" DataMemberBinding="{Binding UnitsInStock}" />
                <telerik:GridViewDataColumn Header="Unit Price" DataMemberBinding="{Binding UnitPrice}" DataFormatString="{}{0:c}"
                                            CellStyleSelector="{StaticResource selector}" />
                <telerik:GridViewDataColumn Header="Unit Price2" DataMemberBinding="{Binding UnitPrice}" DataFormatString="{}{0:c}"
                                            CellStyleSelector="{StaticResource selector}" />
                <telerik:GridViewDataColumn Header="Unit Price3" DataMemberBinding="{Binding UnitPrice}" DataFormatString="{}{0:c}"
                                            CellStyleSelector="{StaticResource selector}" />
                <telerik:GridViewDataColumn Header="Unit Price4" DataMemberBinding="{Binding UnitPrice}" DataFormatString="{}{0:c}"
                                            CellStyleSelector="{StaticResource selector}" />
                <telerik:GridViewDataColumn Header="Unit Price5" DataMemberBinding="{Binding UnitPrice}" DataFormatString="{}{0:c}"
                                            CellStyleSelector="{StaticResource selector}" />
                <telerik:GridViewDataColumn Header="Unit Price6" DataMemberBinding="{Binding UnitPrice}" DataFormatString="{}{0:c}"
                                            CellStyleSelector="{StaticResource selector}" />
                <telerik:GridViewDataColumn Header="Unit Price12" DataMemberBinding="{Binding UnitPrice}" DataFormatString="{}{0:c}"
                                            CellStyleSelector="{StaticResource selector}" />
                <telerik:GridViewDataColumn Header="Unit Price13" DataMemberBinding="{Binding UnitPrice}" DataFormatString="{}{0:c}"
                                            CellStyleSelector="{StaticResource selector}" />
                <telerik:GridViewDataColumn Header="Unit Price14" DataMemberBinding="{Binding UnitPrice}" DataFormatString="{}{0:c}"
                                            CellStyleSelector="{StaticResource selector}" />
                <telerik:GridViewDataColumn Header="Unit Price15" DataMemberBinding="{Binding UnitPrice}" DataFormatString="{}{0:c}"
                                            CellStyleSelector="{StaticResource selector}" />
                <telerik:GridViewDataColumn Header="Unit Price16" DataMemberBinding="{Binding UnitPrice}" DataFormatString="{}{0:c}"
                                            CellStyleSelector="{StaticResource selector}" />
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>
</Examples:GridViewExample>

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 29 Jul 2011, 07:07 AM
Hi,

 Can you post more info about the grid version? Is it our latest official Q2 2011?

Kind regards,
Vlad
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Chuck
Top achievements
Rank 1
answered on 29 Jul 2011, 02:04 PM
Tags
GridView
Asked by
Chuck
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Chuck
Top achievements
Rank 1
Share this question
or