Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

datagrid row color variation 1

Status
Not open for further replies.

obulldog27

Programmer
Apr 26, 2004
169
US
I am using vb6.0 sp6 and would like to know if their is a way to make the row different colors off and on. ie. one white, one blue, etc.
 
well if their is NO other solution then I might have to go that route

thanx
 
hi!,

You could use a control like componentone.com

They have a datagrid that allows conditional colours on rows

for example

-------------------------------------------------------

If TDBGridTblTitle.Columns("product_Category").CellValue(Bookmark) = "" And TDBGridTblTitle.Columns("product_sub_category").CellValue(Bookmark) = "" Then
RowStyle.BackColor = &HFFC0C0
ElseIf TDBGridTblTitle.Columns("product_Category").CellValue(Bookmark) <> "" And TDBGridTblTitle.Columns("product_sub_category").CellValue(Bookmark) = "" Then
RowStyle.BackColor = &HC0FFFF
ElseIf TDBGridTblTitle.Columns("product_Category").CellValue(Bookmark) <> "" And TDBGridTblTitle.Columns("product_sub_category").CellValue(Bookmark) <> "" Then
RowStyle.BackColor = vbWhite
End If

------------------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top