if (e.CommandName == "Add") { GridView grid = (GridView)sender; DropDownList ddlMaterial = (DropDownList)grid.FooterRow.FindControl("ddlMaterial_Type"); TextBox txtMaterialQty = (TextBox)grid.FooterRow.FindControl("txtMaterialQty"); //I think pblm is on here why bcz everytime i call empty DataTable.But i //Don't no how to over come this issue DataTable dt1 = new DataTable(); dt1.Columns.Add("DED_Name", typeof(string)); dt1.Columns.Add("Quantity", typeof(string)); DataRow dr; dr = dt.NewRow(); dr["DED_Name"] = ddlMaterial.SelectedItem.ToString(); dr["Quantity"] = txtMaterialQty.Text.ToString(); dt1.Rows.Add(dr); Msgbox1.alert(dt1.Rows.Count.ToString()); Bind_DocumentNo(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)