Hi,
I am new to the forms world and have a silly doubt.
I have form with a DataGridview and an "Add" button. When the user
clicks on the add button, one row gets added to the datagrid.
Now I want that when the user hits the "Add" button, then new row
should be added and all the previous rows should be disabled for
selection/editing.
How can I disable previous rows for selection/editing?
Here is my sample code (just example..won't compile)
private void buttonAdd_Click(object sender, EventArgs e)
{
// Add new row
DataRow row;
row = diagnosticsTable.NewRow();
// Then add the new row to the collection.
row["DIAGNOSTIC_NAME"] = "AddDiagnosticsName";
row["DIAGNOSTIC_DESCRIPTION"] =
"AddDiagnosticsDescription";
row["SYSTEM_NAME"] = "Newsys";
diagnosticsTable.Rows.Add(row);
this.dataGridViewDiagnostic.CurrentCell =
this.dataGridViewDiagnostic[1, 0];
}
Thankyou...