I use the following code fill a datagridview called dgassets on load:
Private Sub RetrieveAssets()
Dim conn As New OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0;Data Source=" & Application.StartupPath & "\ITAssets.mdb")
Dim adapter As New OleDbDataAdapter("SELECT * FROM tblAssets", conn)
Dim dt As New DataTable("tblAssets")
dgAssets.DataSource = dt
How can I alternate the row colour for each record, ie grey for the 1st, white for the second and then back to grey for the 3rd.
Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.