DataGrid Updating Event prob when AutoGenerateEditButton used...
-
Hi, I am stuck in a prob... I am editing the DataGrid where I have populated the data from DB. Now after editing the particular row I need to update it. I am able to edit but don’t know how to update it as ‘e’(GridViewUpdateEventArgs) is not giving me values...(protected void UpdatingRecord(object sender, GridViewUpdateEventArgs e)) I am copy pasting edit function (which is fine) and Update function which is not working. protected void EditRecord(object sender, GridViewEditEventArgs e) { BindData(); // here I am calling function which opens the DB connection n all... GridView1.EditIndex = e.NewEditIndex; GridView1.DataBind(); } Function not working or donno how to do... where ‘e’ is not giving values.. string 'str' is ‘null’ always... protected void UpdatingRecord(object sender, GridViewUpdateEventArgs e) { //GridView1.UpdateRow(e.RowIndex, true); //this stmt goes into recursion... GridViewRow row = GridView1.Rows[e.RowIndex]; string str = GridView1.Rows[e.RowIndex].Cells[1].Text; // for the time being hardcoded cell } I am getting 'str' as 'null'. Just tell me how to commit the row after editing it to update row coz just now while debugging I got to know that only the row which I am editing is returning ‘null’ but in watch window I changed the rowindex manually to diff row index to see if I am getting values and ‘e’ is showing all values for every column! regards, Supriya Tonape