26-07-16, 03:01 PM
تفضل
PHP كود :
Public Class Form1
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'Database1DataSet.data_1' table. You can move, or remove it, as needed.
Me.Data_1TableAdapter.Fill(Me.Database1DataSet.data_1)
Me.DataGridView1.DataSource = Nothing
Me.DataGridView1.AllowUserToAddRows = False
Me.DataGridView1.AllowUserToDeleteRows = False
For Each row As DataRow In Me.Database1DataSet.data_1.Rows
Me.DataGridView1.Columns.Add(row.Item(0).ToString, row.Item(0).ToString)
Next
Me.DataGridView1.Rows.Add((From x In Me.Database1DataSet.data_1.Rows(0).Table Select x.Item(1)).ToArray)
End Sub
End Class


