dxperience之删除问题

后台代码:

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Dhcc.Botest;
using Dhcc.Entity;
using System.Collections.Generic;
using System.Windows.Forms;

public partial class Person : System.Web.UI.Page 
{
    private ArrayList args = new ArrayList();
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Cache.SetCacheability(HttpCacheability.NoCache);
        BoPerson boperson = new BoPerson();
        this.grid.DataSource = boperson.FindAll();
        this.grid.DataBind();
        if (!IsPostBack)
        {
            PageCommon.GetArgs(args, "Person.aspx", Request, Response);
            ViewState["pid"] = args[1];
            int p_id = Convert.ToInt32(ViewState["pid"].ToString());
            //p_id = 5;
            this.grid.PageIndex = p_id;
           
        }
      
    }

   


    protected void grid_RowDeleted(object sender, DevExpress.Web.Data.ASPxDataDeletedEventArgs e)
    {
            int id = 0;
           IEnumerator ids = e.Keys.Values.GetEnumerator();
           while (ids.MoveNext())
        {
            id = (int)ids.Current;
        }
       
        BoPerson boperson = new BoPerson();
        if (boperson.DelPersonInfoById(id))
        {
            common.Alert("删除成功!","Person.aspx");

        }
        else
        {
            common.Alert("删除失败!");
        }
         Page_Load( sender, e);
    }
  
}

 

 

 

删除按钮是用的

<dxwgv:GridViewCommandColumn VisibleIndex="10">
                        <ClearFilterButton Visible="True">
                        </ClearFilterButton>
                        <DeleteButton Text="删除" Visible="True">
                        </DeleteButton>
                    </dxwgv:GridViewCommandColumn>

 

当点击删除时,能够触发删除事件,并且一直运行到Page_Load( sender, e);
都没有出错。在Page_Load()中也运行正常,数据绑定时,this.grid.DataSource 所绑定的数据已经是删除以后的数据了。但是在程序执行完成之后,aspxgridview控件确不能够正常刷新。一直显示loading。。。。。点击页面刷新后,才能够显示删除后的页面。

一句话就是代码运行没有任何问题,就是运行玩了之后页面的显示不正常,需要重新刷新。这个问题,在使用数据源控件的时候不存在。我想可能是dxperience控件的原因吧。不知道这么解决,希望知道的能够帮忙解答。

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值