Current filter:
                                You should refresh the page.
                                Support Center
                                  • Hi Team,

                                    Could you please tell us, how to color a cell ?

                                    I have tried the same

                                    for Xtragrid : GridView1_RowCellStyle

                                    for Pivot Grid : PivotGrid1_CustomDrawCell

                                    Here the problem is , If you have 1000 record in grid, it will execute min 1000 time. Custom Draw cell execute , the same number of cell count. If pivot grid/xtragrid contrain large number of data, it is affecting the perfomance. Could you please tell , any other we can color some cell , based on index.

                                    suppose cell 1 i have to color - Can we do without the above mentioned event ? Can we do this based on index ?


                                Hi Anoop,

                                Thank you for your issue.

                                The RowCellStyle event is raised only for visible cells. Thus, this event is not raised for all cells in a grid. It is possible that the slow performance is the result of complex calculations in your code.

                                We cannot suggest any definite solution to optimize your application since we do not know what code you are using in your project. Please provide us with a project demonstrating the issue in action, and we will try to optimize it for you.

                                We are looking forward to your response.



                                Hi Team,

                                Still confused. My doubt is this. .

                                1. Do we have any event/method for coloring the selected cells/selected rows instead of using RowCellStyle / CustomDrawCell
                                (for Xtragrid : GridView1_RowCellStyle and for Pivot Grid : PivotGrid1_CustomDrawCell)


                                Hi Anoop,

                                If you wish to change a background or/and foreground color for a selected or/and focused row (cells), you can adjust the GridView.Appearance.FocusedRow , GridView.Appearance.FocusedCell and GridView.Appearance.SelectedRow properties.

                                If you wish to change the appearance settings conditionally, handle the GridView.CustomDrawCell or GridView.RowCellStyle event. Another solution is to utilize Style Format Conditions .

                                Please let me know if you need any further assistance.


                                If you need additional product information, write to us at 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, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

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