AD
Administrator
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.