DataGridViewTextBoxColumn TxtCol = new DataGridViewTextBoxColumn(); DataTable dtGridEdit = new DataTable(); for (int i = 0; i < 4; i++) { dr = dtGridEdit.NewRow(); dtGridEdit.Rows.Add(dr); } dgridEdit.DataSource = dtGridEdit; dgridEdit.Columns.Add(TxtCol); if (dtGridEdit.Rows.Count > 0) { dgridEdit.Rows[1].Cells[0].Value = "1"; dgridEdit.Rows[1].Cells[0].Value = "9"; dgridEdit.Rows[2].Cells[0].Value = "10"; dgridEdit.Rows[3].Cells[0].Value = "11"; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)