protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
string ph = ds.Tables[0].Rows[e.RowIndex][0].ToString();
adpt = new SqlDataAdapter();
comm = new SqlCommand();
comm.CommandText = "delete from Categories where CategoryID = " + ph;
comm.CommandType = CommandType.Text;
comm.Connection = con;
adpt.DeleteCommand = comm;
adpt.Update(ds);
select();
GridView1.DataSource = ds;
GridView1.EditIndex = -1;
GridView1.DataBind();
}
this code is supposed to delete a record in dataset and then delete it from database using the gridview, it doesn't generate any errors but it doesn't delete the record from the dataset