SReenivasulu
Answered On : Jun 29th, 2005
Yes, for this you have to use datatable and after inserting the first row in datatable u have to bind that datatable to the grid and next time , first u have to add the row in datatable and next bind it to datagrid. keep on doing.
u have to maintain the datatable state.
happy coding
bye
srinu

1 User has rated as useful.
Login to rate this answer.
carl
Answered On : Nov 12th, 2005
So Does that mean we can not stop datagrid displaying an empty row at runtime?
Login to rate this answer.
yes,
definitely, we can add row one by one
Login to rate this answer.
may
Answered On : May 25th, 2006
how?
Login to rate this answer.
janardhan
Answered On : May 3rd, 2007
Can you post example code about that Mr. srinu
Thanks
Login to rate this answer.
ashrafali_002
Answered On : Jun 11th, 2007
Yes,
Just apply same code for data load in Datagrid after Save.
Login to rate this answer.
devendra
Answered On : Sep 5th, 2007
Example
dim da as new sqldataadapter("select...",conn)
dimdsas new dataset
da.fill(ds,xyz)
dim dr as datarow
dr=ds.tables(0).rows.newrow
with dr
.items(0)=textbox1.text
.items(1)=textbox2.text
.items(2)=textbox3.text
ds.tables(0).addrow(dr)
datagrid1.datasource=ds.tables(0)
Login to rate this answer.
Yes, you can add rows one by one at runtime. for thatyou have to maintain DataTable and its ViewState. So after pageload data is not removed from datatable.
For display purpose you have to bind that datatable to grid.
for. exp;
Each and every time after adding rowto table you have to maintain its state.
ViewState["Temp"]=(DataTable)dt;
dg.DataSource=(DataTable)ViewState["Temp"];
and going on.
Thanks.

1 User has rated as useful.
Login to rate this answer.