Hello,
i would like to count the total of row with the same color inside a XamdataGrid ;
i use this code in Xaml
<Style TargetType="{x:Type igDP:DataRecordCellArea}"> <Style.Triggers> <DataTrigger Binding="{Binding RelativeSource={x:Static RelativeSource.Self}, Path= Record.Cells[0].Value, Converter={StaticResource nullconvertor}}" Value="{x:Null}"> <Setter Property="Background" Value="#FFFF4600"></Setter> </DataTrigger> </Style.Triggers> </Style>
Then i would calculate the total of row with this color "#FFFF4600".
Do you have any suggestion about that?
Thanks
Hello ,
Thank you for posting to our forum.
I am not sure if I understand your requirement correctly.If you are asking to count the numbers of row of particular color then you can achieve it using the same mechanism which you are using to set the color to any of the row.
Means when you are applying the color to the grid rows , you much have made some condition check for that , here only you can count the number of the rows succeeding with that condition check.
Otherwise we do not have direct property in the grid to count the number of rows having some color, you should have your own logic to achieve the same.