Not the ideal solution, but a work around.
When you say you don't want to databind it again, i take it you concerned
about the trip to the database.
So what you can do, is take the DataSource out of the DataGrid, add a new
row and rebind it. (avoiding a new trip to the database, but still
rebinding)
so if your grid was called MyGrid and it was Bound to a DataTable:
DataTable dt = (DataTable)MyGrid.DataSource; //for a DataSet --> DataSet
ds = (DataSet)MyGrid.DataSource;
//Add a new row to this datatable then rebind
MyGrid.DataSource = dt;
MyGrid.DataBind();
HTH
"Ed Chiu" <Ed****@discussions.microsoft.com> wrote in message
news:38**********************************@microsof t.com...
Hi,
Is there a way to add a row to a datagrid after DataBind method is called.
I
know I can call DataBind again, but that's not what I am looking for.
The reason I want to do this, I have a page to load data into a DataGrid
and
let user edit data, now I want to add function for user to add data also.
The problem, this is All-Or-None situation, the user add/change several
rows
then save all rows together or do nothing at all.
Thanks in Advance for any suggestions