can i add new column in table through gridview?
hi .all
can i add new column in data table through gridview when form load?is it possible? plz tell how is it possible .my code is paste bellow.
private void Form3_Load(object sender, EventArgs e)
{
cn = new SqlConnection("data source=server2;database=costing1;user id=sa;password=sa");
da = new SqlDataAdapter("select *from Itemmaster", cn);
DataTable dt = new DataTable();
dt.Columns.Add("column005", typeof(int));
ds = new DataSet();
da.Fill(ds, "Itemmaster");
cmd = new SqlCommand();
cmd.Connection = cn;
cmd.CommandType = CommandType.StoredProcedure;
dataGridView1 .DataSource =ds .Tables ["Itemmaster"];
}