Click here to Skip to main content
14,733,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
is this possible if there is no data source to bind the gridview then just add the empty rows with templated fields in empty gridview by clicking a button also with edit, update functionality of each row? after that when all the cells of added rows would have value then insert the data of that girdview into sql table?

i want to show empty Gridview with editing and updating the each row also with adding rows functionality on page load


Thanks in advance
Posted

1 solution

yes you can add empty rows in a grid.
you can do
if(Gridview.rows.count==0)
{ 

DataTable dt = new DataTable();

dr = dt.NewRow();

Gridview.DataSource = dt;

}
   
v2

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