I have a gridview bound to a csladatasource. When a row is deleted the grid does not refresh. I am performing a databind on the gridview after the datasource deletes the item from the database. This is called in the gridview's row deleted event handler. Any one have any ideas why the grid is not refreshing? I have included the code I am using.
protected
void CslaDataSourceCustomers_DeleteObject(object sender, Csla.Web.DeleteObjectArgs e){
try
{
Customer.DeleteCustomer( new Guid( e.Keys["TableKey"].ToString() ) ); e.RowsAffected = 1;}
catch ( Csla.DataPortalException ex ){
this.ErrorLabel.Text = ex.BusinessException.Message; e.RowsAffected = 0;}
catch ( Exception ex ){
this.ErrorLabel.Text = ex.Message; e.RowsAffected = 0;}
}
protected
void GridViewCustomerAccounts_RowDeleted(object sender, GridViewDeletedEventArgs e){
Session["currentObject"] = null; GridViewCustomerAccounts.DataBind();}
Copyright (c) Marimer LLC