Hi to everybody,
Can anybody tell me if it's possible to use ajax toolkit to add a new blank row into a datagrid?
Thank you!
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
menelaussa menelaussaPosted Jun 2, 2008, 3:43 AM
Thank you!
I've tested and it's working!
Br
Raj KumarPosted Jun 1, 2008, 11:36 PM
private void Button2_Click(object sender, System.EventArgs e)
{
DataTable dt = (DataTable)Session["dt"];
DataRow row;
row = dt.NewRow();
row.ItemArray = dt.Rows[0].ItemArray;
row["EmployeeID"]=DBNull.Value ;
row["firstname"]="";
row["LastName"]="";
row["HomePhone"]="";
row["Title"]=System.DBNull.Value ;
row["TitleOfCourtesy"]=System.DBNull.Value ;
row["BirthDate"]=System.DBNull.Value ;
row["HireDate"]=System.DBNull.Value ;
row["Address"]=System.DBNull.Value ;
row["City"]=System.DBNull.Value ;
row["Region"]=System.DBNull.Value ;
row["PostalCode"]=System.DBNull.Value ;
row["Country"]=System.DBNull.Value ;
row["Extension"]=System.DBNull.Value ;
row["Photo"]=System.DBNull.Value ;
row["Notes"]=System.DBNull.Value ;
row["ReportsTo"]=System.DBNull.Value ;
row["PhotoPath"]=System.DBNull.Value ;
dt.Rows.Add(row);
dt.AcceptChanges();
DataGrid1.DataSource=dt;
DataGrid1.DataBind();
Session["dt"]=dt;
}