关于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

转载于:https://www.cnblogs.com/forrestsun/archive/2010/09/18/1829875.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值