|
-
Feb 27th, 2007, 12:15 PM
#1
Thread Starter
Lively Member
[RESOLVED] combo box
the following code adds items to a combo box. however it throws an error when it gets to 5 because there is no row at 5. how do i prevent this
Dim length As Integer = ds.Tables(0).Rows.Count()
For i As Integer = 1 To length
Dim wineid As String
wineid = ds.Tables(0).Rows(i)("WineId").ToString()
Me.cboWineID.Items.Add(wineid)
Me.cboWineID.DisplayMember = "WineId"
Next
thanks in advance
notrosh
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
|