i created button in gridview to edit data, When i click that button then it calls
gvTest_Edit method
tranforming a required row into edit mode bcz of
gvTest.EditIndex = e.NewEditIndex;
but lets suppose i want to cancel EDITING by clicking CANCEL then calls this function:
protected void gvTest_EditCancel(Object sender, GridViewCancelEditEventArgs e) { gvTest.EditIndex = -1; // connectToDb(); Response.Write("<br/>"+ "Editing cancelled"); }
now in this function if i comment 'connectToDb()' then my GV doesn't come out of EDIT mode even after clicking CANCEL btn but the message appears which in mentioned
Response.Write("<br/>"+ "Editing cancelled");
but actually doesn't go out of edit mode but if i don't comment and let connectToDb() to be executed then everything ...
Go to the complete details ...