When use RowStyleSelector GridView will use different Template

1 posts, 0 answers
  1. Ifdev02
    Ifdev02 avatar
    68 posts
    Member since:
    Jul 2007

    Posted 07 Jun 2012 Link to this post

    RowStyleSelector. 
    Set to certain condition programatically e.g.

    <local:UpdatedRowStyle.PriceDwStyle>
                        <!--<Style TargetType="telerik:GridViewRow" BasedOn="{StaticResource GridViewRowGlobal}" >-->
                            <Style TargetType="telerik:GridViewRow"  >
                            <Setter Property="Background">
                                <Setter.Value>
                                    <LinearGradientBrush>
                                        <LinearGradientBrush.GradientStops>
                                            <GradientStop Offset="0.00" Color="#FF770000" />
                                            <GradientStop Offset="1.00" Color="DarkRed" />
                                        </LinearGradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                        </Style>
                    </local:UpdatedRowStyle.PriceDwStyle>

    the radGridView will ignore my global theme setting of this ...

    <Style TargetType="telerik:RadGridView">
            <Setter Property="Template" Value="{StaticResource RadGridViewTemplate}" />
            <Setter Property="Background" Value="transparent" /><!--<Setter Property="Background" Value="{StaticResource ControlBackground}" />-->
            <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}" />
            <Setter Property="Foreground" Value="{StaticResource text}" />
            <Setter Property="BorderThickness" Value="1" />
            <Setter Property="AlternateRowBackground" Value="{StaticResource AlternateRowBackground}" />
            <Setter Property="VerticalGridLinesBrush" Value="{StaticResource GridView_GridLinesItemBorder}" />
            <Setter Property="HorizontalGridLinesBrush" Value="{StaticResource GridView_GridLinesItemBorder}" />
            <Setter Property="GroupPanelBackground" Value="{StaticResource GridView_GroupPanelBackground}" />
            <Setter Property="GroupPanelForeground" Value="{StaticResource GridView_GroupPanelForeground}" />
            <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
            <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
            <Setter Property="VerticalAlignment" Value="Stretch" />
            <Setter Property="HorizontalAlignment" Value="Stretch" />
        </Style>

    Since i have disable Mouse over highlight on global, when use rowStyleSelector - the mouse over now activate...

    How do i prevent this?
    If i added baseon on rowstyleselector ... the text sometimes disappears... during realtime updates.


    Please help.
Back to Top