当前位置: 代码迷 >> ASP.NET >> DevExpress.Web.ASPxGridView 删除行后时间后,为什么一直loading
  详细解决方案

DevExpress.Web.ASPxGridView 删除行后时间后,为什么一直loading

热度:11216   发布时间:2013-02-25 00:00:00.0
DevExpress.Web.ASPxGridView 删除行后时间后,为什么一直loading 在线等
ASPxGridView 删除行后时间后,为什么一直loading
  <dxwgv:GridViewCommandColumn VisibleIndex="10">
  <DeleteButton Text="删除" Visible="True">
  </DeleteButton>
  </dxwgv:GridViewCommandColumn>

后端代码

  protected void grid_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
  {
 System.Collections.Generic.List<object> keyValues = this.grid.GetSelectedFieldValues("SerialID");

  SalesOrderData ds = (SalesOrderData)Session["EditSalesOrder"];
   
  DataRow[] dr = ds.SalesOrderDetailTable.Select("SerialID='" + e.Keys[0].ToString().Trim() + "'");
  if (dr.Length > 0)
  {
  dr[0].Delete();
  }

  this.grid.CancelEdit();
  e.Cancel = true;
  this.grid.DataSource = ds;
  this.grid.DataMember = ds.SalesOrderDetailTable.TableName;
  this.grid.DataBind();

}

------解决方案--------------------------------------------------------
 
this.grid.DataSource = ds; 
this.grid.DataMember = ds.SalesOrderDetailTable.TableName; 
this.grid.DataBind(); 
e.Cancel = true; //放最后面
------解决方案--------------------------------------------------------
你的事件选得不对吧,删除事件后应该是 RowDeleted事件,而不是RowDeleting
  相关解决方案