开发者

How to get access to the object bound to node in DevExpress XtraTreeList?

开发者 https://www.devze.com 2023-03-07 18:49 出处:网络
I have create开发者_运维问答d an XtraTreeList control that is bound to my bindingSource and it uses a list of custom objects. The MultiSelect property is set to true, so when the user selects multiple

I have create开发者_运维问答d an XtraTreeList control that is bound to my bindingSource and it uses a list of custom objects. The MultiSelect property is set to true, so when the user selects multiple nodes I want to define what objects are bound to them. But unfortunately I haven't found any property related to contained data (except the Data which is obsolete and is always null). I also tried to use TreeListNode.GetValue, but it only gives me a displayed value and not the object itself

Is there a way to get access to the object bound to node in XtraTreeList?

The last resort is to use Unbound mode and to create them manually, but I would like to know if there is a simple solution for that


Use the TreeList.GetDataRecordByNode method for this purpose.

0

精彩评论

暂无评论...
验证码 换一张
取 消