Trouble in getting combobox populated in windows form!
I want to populate a combobox in windows form in vb.net, but I am having trouble to get it right, here is my code:
Private Sub cboTALXChkDt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboTALXChkDt.Click
Dim cmdCheckDate As New SqlCommand
Dim dtrCheckDate As SqlDataReader
Dim conGPDb As New SqlClient.SqlConnection
conGPDb.ConnectionString = "....................."
.CommandText = "SELECT DISTINCT CHEKDATE FROM UPR30300 WHERE YEAR1 = 2006 ORDER BY CHEKDATE"
.Connection = conGPDb
dtrCheckDate = cmdCheckDate.ExecuteReader()
cboTALXChkDt.SelectedIndex = 0
1. When it's populated, the name of combobox shows up in the box, followed by the items. How to prevent this name of combobox showing up in the box when it's populated? (the first item gets populated after I clicked the dropdown arrow).
2. It shows only one item for the first time I clicked the dropdown arrow of combobox, but the 2nd time I click it, it populates more items to view.....I need it to be populated 10 items a time, so Any suggestion?
Please help. Thank you.