Hi, Can you help me to define a style in app.xaml RowSelectorSettings like: <Style x:Key="RowSelector" TargetType="igGrid:RowSelectorCellControl"> <Setter Property="HorizontalAlignment" Value="Center"/> <Setter Property="VerticalAlignment" Value="Center"/> <Setter Property="Margin" Value="0,0,0,0"/> <Setter Property="Foreground" Value="#FF000000"/> <Setter Property="FontFamily" Value="Impact"/> <Setter Property="FontSize" Value="12"/> <Setter Property="BorderBrush" Value="Gray"></Setter> <Setter Property="BorderThickness" Value="1"></Setter>--> <Setter Property="Background" Value="Transparent"></Setter> </Style>
and to be used in page like: <igGrid:XamWebGrid.RowSelectorSettings> <igGrid:RowSelectorSettings Visibility="Visible" EnableRowNumbering="True" Style="{StaticResource RowSelector}"> </igGrid:RowSelectorSettings> </igGrid:XamWebGrid.RowSelectorSettings>
I tried a lot but failed to find any detailed example or reference to accuplish this.
I also tried following in code but it only works with alternate rows:
Style s = new Style(typeof(Infragistics.Silverlight.Controls.Primitives.RowSelectorCellControl));s.Setters.Add(new Setter(Infragistics.Silverlight.Controls.Primitives.RowSelectorCellControl.BackgroundProperty, new SolidColorBrush(Colors.LightGray)));myGrid.RowSelectorSettings.Style = s;
I specifically wants to apply Grid Header Style to RowSelector. Is it possible?
Thanks
Hi,
The following help article explains how to update the Style properties of our controls in blend. And it actually even explains how to do this for the RowSelectorCellControl:
http://help.infragistics.com/Help/NetAdvantage/Silverlight/2009.2/CLR3.5/html/SL_DesignersGuide_Editing_Style_Properties_Using_Expression_Blend.html
This next help article outlines all of the visual elements in the xamWebGrid, and the style properties that you can use to update them:
http://help.infragistics.com/Help/NetAdvantage/Silverlight/2009.2/CLR3.5/html/SL_DesignersGuide_Styling_Points_for_xamWebGrid.html
As for the alternate row problem you're seeing, that's b/c there is a visual state for Alternate rows. You can remove the alternate state from the row selector, or if you don't want alternate rows at all on the grid, even on normal cells, you can switch off the IsAlternateRowsEnabled of the xamWebGrid.
Hope this helps,
-SteveZ
Thanks for immediate reply,
In deed this very good link but it do not provide style level details like what properties are available. and http://help.infragistics.com/Help/NetAdvantage/Silverlight/2009.2/CLR3.5/html/SL_DesignersGuide_Editing_Style_Properties_Using_Expression_Blend.html is possible with Expression Blend only and unfortunately I don't have that. can you provide me example code of this link?