Click here to Skip to main content
15,898,134 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dim dgvRow As DataGridViewRow
Dim dgvCell As DataGridViewCell
Dim dgvcc As DataGridViewComboBoxCell

Me.dbGrid.Rows.Clear()

If dr.HasRows = True Then

Do While dr.Read
Application.DoEvents()
dgvRow = New DataGridViewRow

dgvCell = New DataGridViewTextBoxCell
dgvCell.Value = dr("EmployeeID").ToString
dgvRow.Cells.Add(dgvCell)


dgvcc = New DataGridViewComboBoxCell
dgvcc.Items.Add(dr("Emailadd"))
dgvRow.Cells.Add(dgvcc)

Me.dbGrid.Rows.Add(dgvRow)
Loop
end if
Posted
Updated 19-Mar-14 13:04pm
v2
Comments
CHill60 23-Mar-14 12:00pm    
Well I tried this and it worked for me. Things to check for ... is there any data in column Emailadd on your database? Is that the exact spelling of EmailAdd on the database - i.e. it is not EmailAdd or emailAdd or emailadd

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900