DataGridView
private void btnsubmit_Click(object sender, EventArgs e) { DataTable table = new DataTable(); table.Columns.Add("pname".ToString()); table.Columns.Add("pprice".ToString()); table.Columns.Add("pq".ToString()); DataRow dr = table.NewRow(); dr["pname"] = cmbpname.Text; dr["pprice"] = txtpprice.Text; dr["pq"] = txtpqu.Text; table.Rows.Add(dr); var bindingSource = new BindingSource(); bindingSource.DataSource = table; dataGridView1.DataSource = bindingSource; bindingSource.ResetBindings(true); }
DataTable
static
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)