C
Calvin Lai
Hi all,
Say I have a DataTable object (oDT) resting on the ViewState object. And I
have a button called AddButton and a DataGrid, which its datasource is the
oDT.
If I want my app behaves so that whenever the user clicked the AddButton,
internally (server side) will add a row into the oDT and the DataGrid will
reflect such changes, AND, with that newly added row as editable.
I have tried many different ways but still no hope. Below is my code
snipplet.
AddButton_Click()
{
oDT.Rows.Add(oDT.NewRow());
oDG.Datasource = oDT;
oDG.DataBind();
oDG.EditeItemIndex = oDT.Rows.Count;
....
}
and it doesn't work...please help.
Calvin
Say I have a DataTable object (oDT) resting on the ViewState object. And I
have a button called AddButton and a DataGrid, which its datasource is the
oDT.
If I want my app behaves so that whenever the user clicked the AddButton,
internally (server side) will add a row into the oDT and the DataGrid will
reflect such changes, AND, with that newly added row as editable.
I have tried many different ways but still no hope. Below is my code
snipplet.
AddButton_Click()
{
oDT.Rows.Add(oDT.NewRow());
oDG.Datasource = oDT;
oDG.DataBind();
oDG.EditeItemIndex = oDT.Rows.Count;
....
}
and it doesn't work...please help.
Calvin