|
-
Apr 26th, 2005, 08:59 AM
#1
Thread Starter
Member
next record
i have a small technical query. i have a drop down list which is displaying the values of supplier id and when i press next it should display the next record and at the same time it should have other values in the drop down.
in next button i have written this code
Dim ls_string As String
Dim li_int As Integer
li_int = sid.SelectedIndex + 1
If li_int < sid.Items.Count Then
ls_string = sid.Items(li_int).Textgs_da = New SqlDataAdapter(" select * from supplier where suppid = '" & ls_string & "'", gs_con)
gs_ds = New DataSet
gs_da.Fill(gs_ds, "supplier")
sid.DataSource = gs_ds
sid.DataTextField = "suppid"
sid.DataBind(view()
Else
title1.Text = " sorry there is no next record in the database"
title1.Visible = True
End If
The problem is that it shows only the next record in the drop down list. how do i get the next record and at the same time have other values in the list.
Thanks,
abhiram
-
Apr 27th, 2005, 11:45 PM
#2
Thread Starter
Member
Re: next record
hey i solved this on my own.
see this is how it works.
gs_da = new sqldataadapter("select * from supplier" , gs_con)
sid.datasource = gs_ds ' dataset
sid.datatextfield = "suppid" ' column in the supplier
sid.databind()
sid.selectedvalue = sid.items(0).text ' displays the first rec in the form
based on this we can move to next , first , last , previous.
this code worked for me
Thanks,
sai abhiram
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
|