Link to home
Start Free TrialLog in
Avatar of Barry Cunney
Barry CunneyFlag for Ireland

asked on

VB 6 DataGrid - Change specific row backcolor based on cell value

Hi Guys,
Is it possible to chnage the back color of specific rows in VB datagrid based on value in cell on that row - sort of like conditional formatting.

I have a data grid coming from an Access table and there is an Include field in the table - For every row that the Include field = "Yes" I want o color the row in blue.


B Cunney
Avatar of JackOfPH
Flag of Philippines image

You can't. Datagrid doesn't support it. May be you could googled for third party control.

I think one of the option is using the true dbgrid control. It has more properties compared to dbgrid control.
May be you could try this free grid...
Avatar of Barry Cunney


Hi Guys,
I was able to this with an MSFlexGrid - There are cell backcolor and cell forecolor properties for this grid

I populate the grid with data from an MS Access table referenced as an ADO recordset, set up in a Data Environment.
As I am populating each record in the MS Flex grid, I check for the relevant criteria(i.e. a certain entry in a certain field and if this entry exists for the current record I simply set the cell backcolor to blue.


B Cunney
Avatar of Computer101
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial