Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim conn As New SqlConnection("data source=localhost;initial catalog=thinghiem;user=sa;pwd=sa") conn.Open() Dim dt As New DataTable Dim da As New SqlDataAdapter("select*from SINHVIEN", conn) da.Fill(dt) DataGridView1.DataSource = dt Me.BindingContext.Item(dt).Position = Me.BindingContext.Item(dt).Position + 1 End Sub
Me.BindingContext.Item(dt).Position = Me.BindingContext.Item(dt).Position
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)