Click here to Skip to main content
16,016,088 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dear All,

I want to create a Blank row in gridview and also all data editable on that gridview.
Please help me if anyone have a solution.

Thank you.
Posted

1 solution

What you can do is insert a new row with blank values for cells.

C#
DataTable dt = new DataTable();
dt.Columns.Add("Name");
dt.Columns.Add("Description");
 
dt.Rows.Add(new object[] { "", "" });
 
GridView1.DataSource = dt;
GridView1.DataBind();
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900