Skip to content

How to delete / edit a row in gridview dynamically

kumartyr

Asked Nov 11, 2013, 8:34 PM EST1 answer
Share
LinkedInX
How to delete or edit a row in gridview dynamically with the delete/edit button present in the columns of gridview itself

please see the image for understanding

i have tried rowdeleting event for deleting & rowediting for edit but no use

using VS2005 asp.net C# 2.0

below is what i tried in rowdeleting event
protected void GridViewFRM_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
if (connection.State == ConnectionState.Closed)
{
connection.Open();
}
OracleCommand OLCOM3 = new OracleCommand();
OLCOM3.CommandText = "Delete from FORUM WHERE QUESTION='" + GridViewFRM.DataKeys[e.RowIndex].Values[0].ToString() + "'";
OLCOM3.ExecuteNonQuery();
DisplayUserData(); }

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    hi
        any one help this i also having same problem.
    0