zoukankan      html  css  js  c++  java
  • 关于XtraGrid的CustomUnboundColumnData事件的触发条件 (收藏)

    http://www.cnblogs.com/wiseant/archive/2010/04/30/1725047.html

    要想让非数据绑定的列触发CustomUnboundColumnData事件以便自行处理该列的显示数据,必须至少做到以下几点:

    1.将该列的UnboundType属性设置为bound(默认值)以外的数据类型

    2.为该列设置一个窗体内全局唯一的FieldName,注意这个FieldName甚至不能出现在窗体上其它XtraGrid中。

    否则CustomUnboundColumnData事件将不会触发,下了断点也没用,很难排错。

    另外,如果表格中部分Unbound列指定的FieldName不唯一,那么如果还有部分Unbound列符合上述条件,那么该部分列的CustomUnboundColumnData事件会正常触发。

    ++++++++++++++++++++++++++++++++++++++++++++++++++

    自己的问题暂时还未解决:如何在窗体加载后更新自己定义非绑定列(搜索中.........)

    答案:

    Processed (Answered) by DevExpress Team at 2009/1/29 9:47:04

    Hello,

    Our documentation states:
    "The CustomUnboundColumnData event is fired in two cases:

    When the grid is loaded it raises the CustomUnboundColumnData event to populate the unbound columns. The event's IsGetData parameter will be set to true (consequently the IsSetData parameter will be set to false). In this case you need to supply data for the currently processed cell. Obtain the required value from a custom data source and assign it to the Value parameter.

    When an unbound column's data is modified via the grid, the CustomUnboundColumnData event is fired with the IsSetData parameter set to true (consequently the IsGetData parameter is set to false). In this case, you should save the modified data specified by the Value property back to the data source. "

    Please provide your sample to illustrate your problem. I'll do my best to help you.

    Thank you, Marina

  • 相关阅读:
    bzoj1432_[ZJOI2009]Function
    Luogu1681_ 最大正方形II
    初等数论-Base-2(扩展欧几里得算法,同余,线性同余方程,(附:裴蜀定理的证明))
    [bzoj2456] mode
    初等数论-Base-1(筛法求素数,欧拉函数,欧几里得算法)
    小程序之Tab切换
    vue-axios基本用法
    vue-过渡动画
    vue-router实例
    永恒之蓝漏洞利用复现
  • 原文地址:https://www.cnblogs.com/forrestsun/p/1829875.html
Copyright © 2011-2022 走看看