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''ve been using PrepareViewStyleInfo event to set the selected row background and it works fine. But this event is turned off in your Grid Performance sample.
So I wonder how efficient using this event is for dynamically updated grids.
Seeking an alternative approach I tried turning off the AlphaBlend bit in the AllowSelection enum reliably makes the row selection color black ignoring the color set in the AlphaBlendSelectionColor.
Any comments?
Thanks
ADAdministrator Syncfusion Team August 2, 2004 02:24 PM UTC
Turning off the alpha blend flag in AllowSelections tells the grid to invert the screen (using an Windows API InvertRect call). This normally leads to the black you described.
One alternative to using PrepareViewStyleInfo to dynamcally color selected cells would be to try to adjust the style.BackColor for each cell as the selctions actually change by handling SelectionsChanging (and maybe SelectionsChanged) to set teh BackColor styles appropriately.
Setting the styles dynamically in PrepareViewStyleInfo is probably the best way to do this. Trying to manage setting and unsetting backColors in selection events would likely be messier and not really gain you much. Just setting a backcolor in PrepareViewStyleInfo is not that big a penalty performancewise.