zoukankan      html  css  js  c++  java
  • ComponentArt Web.UI 升级遇到的问题

    昨天看了一下ComponentArt Web.UI 2008.1的文档说:
    The Web.UI 2008.1 release does not include any breaking changes. Upgrading from a previous Web.UI release (versions: 3.0, 2006.1, 2006.2, 2007.1 or 2007.2) should be as simple as recompiling the application with the new ComponentArt.Web.UI.dll.
    于是就想当然的将ComponentArt Web.UI 2006.1升级到2008.1,用新dll替代旧dll,然而在重新编译时出现异常。异常信息大致是说GridItemDataBoundEventArgs找不到Content属性,而我是用Content来找控件的:
    private void Grid1_ItemDataBound(object sender, GridItemDataBoundEventArgs args)
    {

    Button btnUpdate = (Button)args.Content.FindControl("btnUpdate");
    ……
    }


    后面发现,在2008.1里对ItemDataBound的职能已经做过修改,之前对Content的相关操作都移到ItemContentCreated里来了,经过如下处理,就正常通过编译:
    加上代码
    Grid1.ItemContentCreated += new ItemContentCreatedEventHandler(Grid1_ItemContentCreated);
    然后在Grid1_ItemContentCreated里面写找控件代码,
    之前的那个函数的相关内码就可以注释掉。
  • 相关阅读:
    java-数组
    java-条件判断和循环语句
    java-运算符
    python类与对象
    C#全角半角转换函数
    自己学会汉化DevExpress控件[转]
    DevExpress.XtraGrid的使用(部分)
    .Net 代码安全保护产品DNGuard HVM使用
    DataGridView 添加ComboBox
    c# 使用ChartDirector绘图的一些个人体会
  • 原文地址:https://www.cnblogs.com/flashlm/p/ComponentArt20081UpGradeProblem.html
Copyright © 2011-2022 走看看