I have dynamic number of columns which are bound to the grid. The columns are pairs Value/State. I want to style the CellValuePresenter for 'Value' to bind certain dependency properties based on 'State'. Since the number or columns are determined at runtime, I can't do it xaml, I need to do it programmatically.
I have created a sample where I am doing it in xaml.
<igDP:Field Name="OneValue" Label="One" > <igDP:Field.Settings> <igDP:FieldSettings> <igDP:FieldSettings.CellValuePresenterStyle> <Style TargetType="{x:Type igDP:CellValuePresenter}" BasedOn="{StaticResource {x:Type igDP:CellValuePresenter}}"> <!--NOTE Binding to different field xxxStale 'Path=DataItem.OneStale'--> <Setter Property="Background" Value="{Binding Path=DataItem.OneStale, Converter={StaticResource BooleanToBrushConverter}}"></Setter> </Style> </igDP:FieldSettings.CellValuePresenterStyle> </igDP:FieldSettings> </igDP:Field.Settings></igDP:Field>
Note, in the sample the columns are not dynamic.
Hi Bhavesh,
I am juist checking if you require any further assistance on this matter.