Hi,
I followed the post here http://forums.infragistics.com/forums/p/37921/219286.aspx to add a "select all" checkbox on the column header. That works fine, but the checkbox header loses its background color that gets set from the xamdatagrid royal strong theme, and making it look different from the rest of the field headers.
Please advise how I can preserve the theme color on the header while setting LabelPresenterStyle?
I also want to know how I can set the header CheckBox value at run time?
Here's the xaml I have:
<igDP:XamDataGrid x:Name="grid" GroupByAreaLocation="None" DataSource="{Binding Path=Rules}" Theme="RoyaleStrong">
<igDP:XamDataGrid.Resources>
<
Style x:Key="CheckBoxedHeaderStyle" TargetType="{x:Type igDP:LabelPresenter}">
Setter Property="ContentTemplate">
Setter.Value>
DataTemplate>
CheckBox Name="HeaderCheckBox" Content="{Binding}" Click="HeaderCheckBox_Click"/>
</
Setter>
Style>
igDP:XamDataGrid.Resources>
................
igDP:Field Name="IncludeValuationPercent" Label="Include Val%" Width="85">
<igDP:Field.Settings>
Thanks Petar. That works!
For the Record:
Style x:Key="CheckBoxedHeaderStyle" TargetType="{x:Type igDP:LabelPresenter}" BasedOn="{x:Static igThemes:DataPresenterRoyaleStrong.LabelPresenter}">
My second question is how can I check the header checkbox in code?
Thanks,
Here is a blog post that describes what you need: http://blogs.infragistics.com/blogs/andrew_smith/archive/2009/12/09/common-style-issues-when-using-the-theme-property.aspx
Let me know if you require any further clarification on the matter.
Sincerely,
Petar, MCTS
Developer Support Engineer
Infragistics
www.infragistics.com/support