The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I am coloring a databound grid in the PrepareViewStyleInfo event which works fine, however when clicking in certain cells the coloring of the cells is changed to an incorrect color.
How can I stop this event from firing when a user clicks a cell, or just ignore the click event in the PrepareViewStyleInfo event?
The coloring of the grid only needs to occur when it is first loaded.
Regards
Aaron
ADAdministrator Syncfusion Team March 22, 2005 06:30 PM UTC
You cannot turn PrepareViewStyleInfo off on a cell by cell basis.
And, you have to continually set the color in PrepareViewStyleInfo or the color will be lost the next time the cell is drawn.
So, you need to track down why PrepareviewStyleInfo is getting the wrong color. If you post your handler code here, maybe we can suggest something.
If the color is set on a column basis, you can set it using GridBoundColumn.StyleInfo.Color for teh column. But if it varies from cell to cell, then you will have to use PrepareViewStyleInfo in a GridDataBoundGrid.