Click here to Skip to main content
15,892,072 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am binding the database values into datagridview combobox column at runtime.
it working fine, but it shows the blank at first row.Don't know how to set the index=0..




thanks in advance
Sucharitha
Posted
Comments
Post your codes...
AshishChaudha 9-Aug-12 7:09am    
Could you please show us the code, so that help you better.
RagSuchi 9-Aug-12 7:14am    
Hi,

myTaskCodes = FillTask_Combo(Label2.Text)

Dim arr As Object()
Dim objWSRCode As WsrTask
Dim cboWSRCode As DataGridViewComboBoxColumn

cboWSRCode = Me.DataGridView1.Columns("TaskName")
'cboWSRCode.Items.Add("Select")
cboWSRCode.ValueMember = "Value"
cboWSRCode.DisplayMember = "Description"

For i As Integer = 0 To myTaskCodes.Count - 1
arr = myTaskCodes(i)
objWSRCode = New WsrTask
objWSRCode.TaskValue = arr(0).ToString
cboWSRCode.Items.Add(objWSRCode.TaskValue)

Next

1 solution

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