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

When use RowStyleSelector GridView will use different Template

0 Answers 76 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.
Ifdev02
Top achievements
Rank 1
Ifdev02 asked on 07 Jun 2012, 10:59 AM
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.
Tags
GridView
Asked by
Ifdev02
Top achievements
Rank 1
Share this question
or