1

Closed

DatagridRow

description

I have to set background of rows to different color based on some criteria. For example, if I have similar names on 3 consecutive rows I would like to have them some identical color. How do you do that? Would appreciate any feedback.

Following is a code I tried:

<extendedGridControl:ExtendedDataGrid.RowStyle>
                <Style TargetType="{x:Type DataGridRow}">
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding Some}" Value="Pi">
                            <Setter Property="Background" Value="Red"></Setter>
                        </DataTrigger>
                        <DataTrigger Binding="{Binding Some}" Value="Kir">
                            <Setter Property="Background" Value="Green"></Setter>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </extendedGridControl:ExtendedDataGrid.RowStyle>
I would like value to be determined at runtime also.


thanks
Ajay
Closed Mar 5, 2015 at 7:12 PM by bpoojary
this is special request and can be done with help of style its not an issue of this grid.

comments

bpoojary wrote Feb 24, 2015 at 7:21 PM

Your code looks fine to me, what issue you are facing?

wrote Mar 5, 2015 at 7:12 PM