Start Free Trial
Come for the solution, stay for everything else.
Start Free Trial
VB 6 DataGrid - Change specific row backcolor based on cell value
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.
Visual Basic Classic
8/22/2022 - Mon
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...
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.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
ASKER CERTIFIED SOLUTION
Log in or sign up to see answer
Become an EE member today
7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Plans and Pricing
Certified Expert Program
© 1996-2022 Experts Exchange, LLC. All rights reserved. Covered by US Patent