Hi,
Can't find proper solution for below problem.
I have change the Orientation="Horizontal" and set HighlightAlternateRecords="True"
but system set alternet column's color..
You could set the LabelPresenterStyle the same way as you did for the CellValuePresenter e.g:
<igDP:FieldSettings>
<igDP:FieldSettings.LabelPresenterStyle>
<Style TargetType="{x:Type igDP:LabelPresenter}">
<Setter Property="Background" Value="Blue"/>
</Style>
</igDP:FieldSettings.LabelPresenterStyle>
</igDP:FieldSettings>
Hope this helps.
Now..If i set LabelPresenter ..then it chagne header of all columns.But..our need is differe
If i want to do it alternately ...e.g. in below example
----Degree our Field backgroud will be Blue
----FirstNameour Field backgroud will be Red..I want to set header's style same as field..
<igDP:Field Name="Degree" Label="Degree" > <igDP:Field.Settings> <igDP:FieldSettings> <igDP:FieldSettings.CellValuePresenterStyle> <Style TargetType="{x:Type igDP:CellValuePresenter}" > <Setter Property="Background" Value="Blue"/> <Setter Property="BorderBrush" Value="#FFDFDFDF"/> <Setter Property="BorderThickness" Value="0.5"/> </Style> </igDP:FieldSettings.CellValuePresenterStyle> </igDP:FieldSettings> </igDP:Field.Settings>
</igDP:Field> <igDP:Field Name="FirstName" Label="FirstName"> <igDP:Field.Settings> <igDP:FieldSettings> <igDP:FieldSettings.CellValuePresenterStyle> <Style TargetType="{x:Type igDP:CellValuePresenter}" > <Setter Property="Background" Value="Red"/> <Setter Property="BorderBrush" Value="#FFDFDFDF"/> <Setter Property="BorderThickness" Value="0.5"/> </Style> </igDP:FieldSettings.CellValuePresenterStyle> </igDP:FieldSettings> </igDP:Field.Settings> </igDP:Field> </igDP:FieldLayout.Fields>
For changing the background of the headers you can define custom style for the LabelPresenter similar to this:
<Setter Property="Background" Value="Azure"/>
The you could set it to your desired fields using the LabelPresenterStyle property.
All the GRID header are gray background..
we want to set backgroud as per column name..so for that also..we plz suggest best way to do it?
This is expected behavior since you change the Orientation in the grid. You could create a custom style for the CellValuePresenter and change the Background brush. Then you can assign this style to some of the Fields in the grid. Alternatively you can use converter to bind the Background based on the Field.Index