0% found this document useful (0 votes)
2 views1 page

code datagridview

The document is a Visual Basic code for a Windows Form application that manages a DataGridView. It initializes a DataTable with columns for client information and populates it with data from text boxes when a button is clicked. The DataGridView displays the data from the DataTable.

Uploaded by

selmansaadi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

code datagridview

The document is a Visual Basic code for a Windows Form application that manages a DataGridView. It initializes a DataTable with columns for client information and populates it with data from text boxes when a button is clicked. The DataGridView displays the data from the DataTable.

Uploaded by

selmansaadi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Imports System.Data.

DataTable
Public Class Form7
Dim table As New DataTable("table")
Private Sub Add_Update_Delete_DataGrIdview_Row_load(ByVal sender As Object,
ByVal e As EventArgs) Handles MyBase.Load
table.Columns.Add("Code client", Type.GetType("System.Int32"))
table.Columns.Add("nom", Type.GetType("system.new.Int32"))
table.Columns.Add("Prénom", Type.GetType("System.Int32"))
table.Columns.Add("N° Téléphone", Type.GetType("System.Int32"))
table.Columns.Add("Date de naissance", Type.GetType("System.Int32"))
table.Columns.Add("Ville", Type.GetType("System.Int32"))
table.Columns.Add("Code Postale", Type.GetType("System.Int32"))

DataGridView1.DataSource = table
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click
table.Rows.Add(TextBox1.Text, TextBox2.Text, TextBox3.Text, TextBox4.Text,
TextBox5.Text, TextBox6.Text, TextBox7.Text, TextBox8.Text)
DataGridView1.DataSource = table
End Sub
End Class

You might also like