Dataset not refreshing

saidev

Active member
Joined
Dec 22, 2005
Messages
27
Programming Experience
1-3
Hi Guys,
When i do next and previous the dataset is not refreshing the data. how to refresh the dataset. can you guys help me with the below code.
Thanks,

Private Sub cmdNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdNext.Click
Dim objDS As DataSet = Session("DataSet")
Dim objDataRow As DataRow
Dim Message As String
If objDS.Tables(0).Rows.Count > Session("CurrentIndex") + 1 Then
Session("CurrentIndex") = Session("CurrentIndex") + 1
objDataRow = objDS.Tables(0).Rows(Session("CurrentIndex"))
populateGUI(objDataRow)
Else
MsgboxAlert("You have reached the last record.")
End If
End Sub
 
Is it a dataset refresh or a datarow refresh? If it is dataset refreshing, then you might consider using the dataadaptors Fill() method... :)
 
Back
Top