您的位置:首页 > 产品设计 > UI/UE

ComponentArt Web.UI控件的bug及解决办法

2004-11-25 21:12 543 查看
在使用ComponentArt Web.UI 2.0.1983控件的过程中,如果Web.UI控件的EnableViewState在ASPX页面中设置为False(也就是在VS.NET设计器中设置属性),就会发现DataGrid控件的PageIndexChanged事件和DeleteCommand等由_doPostback触发的相关事件都不能被触发,而且PostBack以后DataGrid上的数据会丢失(即使ViewState设置为True也没有用)。

解决办法如下,或者见ComponentArt Knowledge Base Q10048

Workarounds

There are a couple of workarounds for this problem:

 

1. Enable viewstate for the Web.UI control.

 2. Instead of disabling viewstate in the control tag with EnableViewState="false", disable it in Page_Load:

Remove the assignment EnableViewState="false" from the control tag in the .aspx page;

Set the property in the Page load phase:

    private void Page_Load(object sender, System.EventArgs e)
    {
      Menu1.EnableViewState = false;

      ...
    }
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: