6
Reply

delete event not working

muhammad waqas

muhammad waqas

Aug 2 2013 5:04 AM
1.1k
        protected void gvMyRecord_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {

            SqlCommand command = new SqlCommand("DELETE FROM customer_record WHERE customer_id='" +                        ResultGridView.DataKeys[e.RowIndex].Values[0].ToString() + "'");
            connection.Open();
            command.ExecuteNonQuery();
            connection.Close
            FillVendorGrid();
        }

 
QUESTION: i an unable to understand this code please give me some guideline i will be very thank full to you

Answers (6)