Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • Also, We tried to change the yellow color of the grouped selection but it seems the Background property doesn ́t work for this purpose (the TextBlock.Foreground actually works for this purpose, and it ́s color is set to black in the sample to contrast the yellow, but changing that background would be better).

                                    Any help is very much appreciated.

                                    If you need more details, let me know.

                                    Thanks in advance.

                                dev_express_question.zip
                                0

                                Hi Juliano,

                                The selected row's background can be defined in the OddEvenRowStyle using the as follows:

                                	
                                [XAML]
                                <Style x:Key="OddEvenRowStyle" TargetType="{x:Type dxg:GridRowContent}"> <!--Row Normal--> <Setter Property="TextBlock.Foreground" Value="#AAAAAA"/> <Setter Property="BorderBrush" Value="#555555" /> <Style.Triggers> <MultiDataTrigger> <MultiDataTrigger.Conditions> <Condition Binding="{Binding Path=EvenRow}" Value="False"/> <Condition Binding="{Binding Path=SelectionState}" Value="None"/> </MultiDataTrigger.Conditions> <Setter Property="Background" Value="{StaticResource evenRowBrush}" /> </MultiDataTrigger> <MultiDataTrigger> <MultiDataTrigger.Conditions> <Condition Binding="{Binding Path=EvenRow}" Value="True"/> <Condition Binding="{Binding Path=SelectionState}" Value="None"/> </MultiDataTrigger.Conditions> <Setter Property="Background" Value="{StaticResource oddRowBrush}" /> </MultiDataTrigger> <!--Row Selected--> <Trigger Property="dxg:DataViewBase.IsFocusedRow" Value="true"> <Setter Property="TextBlock.Foreground" Value="#CCCCCC" /> <Setter Property="Background" Value="#494949" /> </Trigger> <DataTrigger Binding="{Binding Path=SelectionState}" Value="Selected"> <Setter Property="Background" Value="Lime" /> </DataTrigger> </Style.Triggers> </Style>

                                The last data trigger turns the row's background to lime based on the SelectionState property value. Please try this solution and provide us with your feedback on whether or not it suits your needs.

                                Thanks,
                                Dmitry

                                0

                                Thank you very much for your reply.

                                Maybe I have not expressed myself very clearly. I meant the GroupRowStyle instead of RowStyle.

                                The background color of the rows are already being changed, however, when the rows are grouped they keep the yellow background, as you can see in the screenshot.

                                I tried this approach applying the following style to GroupRowStyle TableView ́s Atribute.

                                Any help will be very appreciated;

                                [XAML]

                                    <!--Row Groups Style-->
                                    <Style x:Key="OddEvenGroupRowStyle" TargetType="{x:Type dxg:GroupGridRowContent}">

                                        <!--Row Group Normal-->
                                        <Setter Property="TextBlock.Foreground" Value="#AAAAAA"/>
                                        <Setter Property="BorderBrush" Value="#555555" />

                                        <Style.Triggers>

                                            <MultiDataTrigger>
                                                <MultiDataTrigger.Conditions>
                                                    <Condition Binding="{Binding Path=EvenRow}" Value="False"/>
                                                    <Condition Binding="{Binding Path=SelectionState}" Value="None"/>
                                                </MultiDataTrigger.Conditions>
                                                <Setter Property="Background" Value="{StaticResource evenRowBrush}" />
                                            </MultiDataTrigger>

                                            <MultiDataTrigger>
                                                <MultiDataTrigger.Conditions>
                                                    <Condition Binding="{Binding Path=EvenRow}" Value="True"/>
                                                    <Condition Binding="{Binding Path=SelectionState}" Value="None"/>
                                                </MultiDataTrigger.Conditions>
                                                <Setter Property="Background" Value="{StaticResource oddRowBrush}" />
                                            </MultiDataTrigger>

                                            <!--Row Group Selected-->
                                            <Trigger Property="dxg:GridViewBase.IsFocusedRow" Value="True">
                                                <Setter Property="TextBlock.Foreground" Value="#000000" />
                                                <Setter Property="Background" Value="Orange" /> <!-- <<<<<<<<<<<<<<<<<< THIS DOES NOT WORK -->
                                            </Trigger>
                                        </Style.Triggers>
                                    </Style>

                                0

                                Hi Juliano,

                                Thank you for your clarification. I missed the fact that background should be changed for group rows.

                                This task can not be accomplished via a custom style, since separate borders are defined in a group row template to show selected and focused states. It is necessary to override this default template to change group row background.

                                You will find the modified sample project in the attachment. Feel free to reactivate this ticket if you need any further assistance.

                                Thanks,
                                Dmitry

                                Q392554.GridStyles.Modified.zip
                                0

                                Thanks

                                To start a chat you should create a support ticket


                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2014 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners