Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load conn = New SqlConnection("") conn.Open() Dim query As [String] = "SELECT * FROM dtaTraLoiChoVanBan" da = New SqlDataAdapter(query, conn) Dim cb As New SqlCommandBuilder(da) dt = New DataTable() da.Fill(dt) C1FlexGrid1.DataSource = dt conn.Close() End Sub Private Sub ToolStrip1_ItemClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles ToolStrip1.ItemClicked Select Case e.ClickedItem.Name Case "ToolStripButton1" '---> button insert da.Update(dt) End Select End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)