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: 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 |