0

hi
I have the codes for the save,delete and update button but I need the codes for first,prev,last and next can you please help. please

5
Contributors
5
Replies
9
Views
6 Years
Discussion Span
Last Post by Reverend Jim
0

you can try this.

dim tableadapter as new dataTable
dim position as integer = 0
'for the first record
position = 0 
textbox1.text = tableadapter.rows(position)("yourfield").tostring()

' for next record
if tableadapter.rows.count > 0 then
position = posiiton +1 
textbox1.text = tableadapter.rows(position)("yourfield").tostring()

' for previous record
if tableadapter.rows.count > 0 then
position = position -1 
textbox1.text = tableadapter.rows(position)("yourfield").tostring()

' for last record
if tableadapter.rows.count > 0 then
position =tableadapter.rows.count - 1 
textbox1.text = tableadapter.rows(position)("yourfield").tostring()

hope it helps u..

0

please help me about examination system, i proposed to my professor that i have a randomized question and it will be have a back button. in one form it will have a many question with three choices using radio button and label.. thanks

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.