forum.venkateswarlu.net
      Register      Login
project

1 replies to this topic

Saravanan Ramamoorhty #1
Member
58 Points
Posted on 27 Dec 2011 08:22 PM IST how to add a new row into gridview.. 
Training Projects     871 views     Reply to this topic
Jahnavi N #2
Member
164 Points
Replied on 28 Dec 2011 02:54 AM IST Hi,

Grid view will be displayed when we provide a Data Table as its data source.

If you want to add a new row to grid view simply add a new row to data table and then bind the grid view once again.

DataTable DataTable1 = new DataTable()
DataTable1 = assign your datatable to this variable
DataRow dr=DataTable1.NewRow();

GridView1.DataSource = DataTable1;
GridView1.DataBid();

I hope this code will help you.

Thanks
Jahnavi 
Reply to this topic