i have a problem while updating specific records in datagridview..

i want to update specific records on my datagridview.. but only the first records are updating..
LVLStat name of column
Sections name of table

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Try
            ds.Tables(0).Rows(0).Item("LVLStat") = Me.txtUpdate.Text
 da.Update(ds, "Sections")
            MsgBox("Records Updated")
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
ds.Tables(0).Rows(0).Item("LVLStat") = Me.txtUpdate.Text

is the problem, you told it to update only this record. What you need to use is this to update your selected record

ds.SelectedRows.Item(0) = Me.txtUpdate.Text
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.