I'm facing some annoying GridView behavior where it fires the RowDeleting event twice.
I'm doing the very normal (logical) steps for deleting a row from a GridView. Here is what I'm doing:
1- my test Page_Load method
protected void Page_Load(object sender, EventArgs e)
GridView1.DataSource = GetDataTable();
// Note: GetDataTable() returns a non-null DataTable object.
// Also the DataTable has more than 1 row
// (i.e. everything is fine with the datatable)
2- the GridView has a Delete Command Field.
3- on tracing I've noticed my RowDeleting event gets fired twice! (also I used a static counter to see how many times the event gets fired when clicking on the GridView delete button, which was also confirmed it that it's counting 2 per each click).
Am I doing something wrong? please help
View Complete Post