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 ?
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.
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.