Hi,
I am using WinGrid 7.1. I am wondering how we can set the highlight'ed row's color as transparent (i.e. so it keeps the original row background color based on InitializeRow event) and the border of the highlighted row to be Red?
It seems that whenever I change the background color of the highlight'ed row to "Empty", the highlighted row will become blank. Any Ideas?
Kai
Hi Kai,
Your question is pretty complex and I need more information in order to help you out.
What highlight color are you referring to? Is the row being highlighted because it's the ActiveRow? Or because it selected?
What exactly are you doing in InitializeRow? What property of the row are you setting? You might just need to use CellAppearance on the row inside of the row's Appearance.
Regarding a border, this would not be easy to do. A row doesn't draw all four sides of it's own border. If it did, you would end up with double-thick borders between rows. So most rows only draw one or two border sides. So changing the border color on a row will look weird. You might be able to acheive what you want using a DrawFilter, but personally, I would recommend finding another way to highlight the row instead of using a border.
I have a similar question - I want to highlight the selected row(s) with a coloured border rather than a coloured background.
The background colour of the row is changed in the InitalizeRow event. This event can be fired at any time so I want to make sure the user is aware of the colour of the rows even if they are the selected rows at the time. I already have code in place to maintain the selected row(s) and active row when the grid datasource refreshes - the only problem I have is that it appears I cannot highlight a row in some way that doesn't affect the backcolor.
Please can you help? I am using version 2007.3 for WinForms.
Thanks
Mark