Hi,
Pls could anyone tell me how to do the following task.
I am having a datagrid with certain columns. Now what i need is , I
have to include a button in each row and on clicking this button , i
have to generate a similar row below the row that have clicked . ie
like a child row for the parent row in which i have clicked the button.
Thanks and Regards,
S.Ramalingam
Elton W - 18 Feb 2006 23:42 GMT
Hi Ram,
Suppose you are using a DataTable as data source of the datagrid. In
datagrid_ItemCommand event,
DataTable table = getTable_Method();
int index = e.Item.ItemIndex;
DataRow AddedRow = table.NewRow();
AddedRow.ItemArray = table.Rows[index].ItemArray;
table.Rows.InsertAt(index + 1, AddedRow);
datagrid.DataSource = table;
datagrid.DataBind();
HTH
Elton Wang
> Hi,
>
[quoted text clipped - 7 lines]
> Thanks and Regards,
> S.Ramalingam
vinu - 20 Feb 2006 11:06 GMT
Hi
Check this site...
http://www.datagridgirl.com/articles.aspx
Vinu
> Hi,
>
[quoted text clipped - 7 lines]
> Thanks and Regards,
> S.Ramalingam