What should i do? It doesnt add a row even if i already declare a new row.
//This is my behind codes in add button
DataTable dt = new DataTable();
DataRow dr = null;
dt.Columns.Add(new DataColumn("Column1", typeof(string)));
dt.Columns.Add(new DataColumn("Column2", typeof(string)));
dr = dt.NewRow();
dr["Column1"] = "";
dr["Column2"] = TextBox1.Text;
dt.Rows.Add(dr);
ViewState["CurrentTable"] = dt;
ListView1.DataSource = dt;
ListView1.DataBind();
//This is my layout code
|
2 Replies
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.
Guest UserPosted Sep 11, 2018, 11:08 PM
Chandan PrasadPosted Sep 11, 2018, 10:35 PM