|
-
July 7th, 2012, 03:26 AM
#1
populating dropdown in windows forms
i have a form with a dropdown
i am populating dropdowmn from database but having few issues
i have a sub function fr populating the dropdown as
Dim da1 As New SqlDataAdapter(cmd1)
Dim ds1 As New DataSet()
da1.Fill(ds1, "M_customer")
Me.drpcust.DataSource = ds1
Me.drpcust.DisplayMember = "Cname"
Me.drpcust.ValueMember = "CID"
but after this line Me.drpcust.DataSource = ds1 the prg flow jumps to another sub function
having If drpcust.SelectedIndex = -1 Then
cmdsave.Enabled = False
Button1.Enabled = False
which shld not happen
and even he dropdown is not getting populated
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|