Hi everybody...
i'm the new guy here and also a new user for
vb.net source code...
i want to ask about how to add a new and empty column to a gridview which can type the heading in a textbox and click a button to add the column in the runtime by using the
vb.net source code?
Can anybody help me?
so far i have this code to view my data in the gridview:
Dim ds As DataSet = New DataSet()
Dim conn As OleDbConnection = New OleDbConnection
Dim cmd As OleDbCommand = New OleDbCommand
Dim DataAdapter As OleDbDataAdapter = New OleDbDataAdapter()
conn.ConnectionString = ("Provider=microsoft.jet.oledb.4.0;data source = " & Server.MapPath("db1.mdb"))
cmd.Connection = conn
cmd.CommandText = "SELECT * FROM Stock"
DataAdapter.SelectCommand = cmd
DataAdapter.Fill(ds, "Stock")
gv1.DataSource = ds
gv1.DataBind()
conn.Open()
DataAdapter.Fill(ds, "Stock")
gv1.DataSource = ds