http://www.aspsnippets.com/Articles/Add-record-to-Database-using-ASP.Net-GridView-EmptyDataTemplate-and-FooterTemplate.aspx
This link adds only to database
I am creating a Data Table in code and at a click event i am allowing to add only 1 row which will be added to DATATABLE
Later again after adding one more row data it will again save to DATA TABLE. In DATA TABLE now there will be 2 rows which should be displayed when binded to gridview