Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1435
XamDataGrid DataRecordCellArea Issue
posted

I have the following style for DataRecordCellArea and CellValuePresenter. I'm still getting the default style to show as double.

When clicking to the right of the radio button of Line "A", it  becomes Active. Clicking on the radio button of Line "B" makes Line "A" Selected and  Line "B" Active.

Why Line A becomes Selected ?

Please refer to this sample project (Infragistics v17.2)

To replicate this issue:

Run the project, Click to the right of the Radio button (not on it), and click on another Radio button.

         <Style TargetType="{x:Type igDP:CellValuePresenter}">
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding IsActive, RelativeSource={RelativeSource Self}}"
                                     Value="True">
                            <Setter Property="BorderActiveBrush"
                                    Value="Red" />
                            <Setter Property="BackgroundActive"
                                    Value="Green" />
                            <Setter Property="BorderThickness"
                                    Value="0,3,0,3" />
                        </DataTrigger>
                        <DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}"
                                     Value="True">
                            <Setter Property="BorderActiveBrush"
                                    Value="Red" />
                            <Setter Property="BackgroundActive"
                                    Value="Green" />
                            <Setter Property="BorderThickness"
                                    Value="0,3,0,3" />
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
                <Style TargetType="{x:Type igDP:DataRecordCellArea}">
                    <Setter Property="BorderHoverBrush"
                            Value="Salmon" />
                    <Setter Property="BackgroundHover"
                            Value="Salmon" />
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding IsActive, RelativeSource={RelativeSource Self}}"
                                     Value="True">
                            <Setter Property="BorderActiveBrush"
                                    Value="DarkRed" />
                            <Setter Property="BackgroundActive"
                                    Value="White" />
                            <Setter Property="BorderThickness"
                                    Value="3" />
                        </DataTrigger>
                        <DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}"
                                     Value="True">
                            <Setter Property="BorderActiveBrush"
                                    Value="DarkRed" />
                            <Setter Property="BackgroundActive"
                                    Value="White" />
                            <Setter Property="BorderThickness"
                                    Value="3" />
                        </DataTrigger>
                    </Style.Triggers>
                </Style>

It looks like the first record becomes Selected and the Second becomes Active

                <Style TargetType="{x:Type igDP:DataRecordCellArea}"
                       BasedOn="{StaticResource {x:Type igDP:DataRecordCellArea}}">
                    <Setter Property="BorderHoverBrush"
                            Value="Salmon" />
                    <Setter Property="BackgroundHover"
                            Value="Salmon" />
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding IsActive, RelativeSource={RelativeSource Self}}"
                                     Value="True">
                            <Setter Property="BorderActiveBrush"
                                    Value="Yellow" />
                            <Setter Property="BackgroundActive"
                                    Value="Yellow" />
                         
                        </DataTrigger>
                        <DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}"
                                     Value="True">
                                                       
                            <Setter Property="BorderSelectedBrush"
                                    Value="Green" />
                            <Setter Property="BackgroundSelected"
                                    Value="Green" />
                            <Setter Property="BorderThickness"
                                    Value="3" />
                        </DataTrigger>
                    </Style.Triggers>
                </Style>

Parents
No Data
Reply
  • 18204
    Offline posted

    Hi User201,

    Thank you for posting in our forums!

    I am not sure I understand the issue here.  So I may better assist you with this, clarify what it is you are expecting to see in this scenario and what you are trying to accomplish.

    If you are referring to the selected color of the row when clicking outside of the radio button, the XamDataGrid has logic separate from your IsSelected property that is selecting the row. You can change this color with the following Style settings:

    <Style TargetType="{x:Type igDP:DataRecordCellArea}">
        <Setter Property="BackgroundSelected" Value="Transparent"></Setter>
        <Setter Property="BorderSelectedBrush" Value="Transparent"></Setter>

    If you need further assistance with this, please let me know and I will be glad to help.

Children