DataTable dt = new DataTable(); DataRow dr = null; dt.Columns.Add(new DataColumn("ItemNo", typeof(System.Int32))); dt.Columns.Add(new DataColumn("Description", typeof(string))); dt.Columns.Add(new DataColumn("Qty", typeof(System.Int32))); dr = dt.NewRow(); dr["ItemNo"] = DBNull.Value; dr["Description"] = string.Empty; dr["Qty"] = DBNull.Value;
TextBox box1 = (TextBox)ItemGv.Rows[rowIndex].Cells[1].FindControl("itemNotb"); TextBox box2 = (TextBox)ItemGv.Rows[rowIndex].Cells[2].FindControl("desctb"); TextBox box3 = (TextBox)ItemGv.Rows[rowIndex].Cells[3].FindControl("qtytb"); drCurrentRow = dtCurrentTable.NewRow(); drCurrentRow["ItemNo"] = box1.Text; drCurrentRow["Description"] = box2.Text; drCurrentRow["Qty"] = box3.Text;
rowIndex
cells[3]
myArray[0] myArray[1] myArray[2]
myArray[1] myArray[2] myArray[3]
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)