none
Update Gridview at run time RRS feed

  • Question

  • Hi,

    I have a problem about gridview control.

    I had bind the gridview dynamicaly in the page load event. Now i want to edit the gridview data.Edit and cancle are successfull. But while updating I am uanble to take back updated data.

    Look at the following code;

     

    Response.Write(((TextBox)GridView1.Rows[GridView1.EditIndex].Controls[1].FindControl("T1")).Text );

    OR

    string id =((TextBox)(GridView1.Rows[e.RowIndex].Controls[1].FindControl("T1"))).Text;

    OR

    string id = GridView1.Rows[(e.RowIndex + 1)].Cells[1].Text;

     

    What should I do at run time to add such templetfield for each column.

     

    Thanks & Regards,

    Jaydeep

    Wednesday, May 28, 2008 10:59 AM

Answers