I have a grid view, with 'select' button in each row,i renamed this 'select' button as 'copy row'.my requirement is, when i click on this copy row button, a new row has to add below the selected row. and i succeed in this.
for this, i wrote code in "gridview_selectedIndexChanging" event as:
int i = e.NewSelectedIndex;
GridViewRow gr = GridView1.Rows[i];
GridViewRow row = new GridViewRow(i, i, DataControlRowType.DataRow, DataControlRowState.Insert);
GridView1.Controls[0].Controls.AddAt(i + 2, row);
I succeed in this scenario.
But when i click on another 'copy row' button, first copied row has not persisted;and i have failed in this case.
Hope i will get an optimum solution.
Thanks in advance,