Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
4165
UltraTree DataSource - How to control which field is the Key, which Field is Displayed?
posted

Hello,

Have what I think is a simple question but cannot find an answer.

I have a tree, setting view style to standard.

Setting datasource to a list<t>. Say list is part, and it has Id, Name, Price, Description, Et.

I want the key of the node to be Id, and the Text of the node to be Name.

Thanks,
M.

Parents
No Data
Reply
  • 7535
    Offline posted

    Hello Michael,

    Thank you for contacting . For your specific requirement you can handle the InitializeDataNode event, and set the key and text on the Node provided on the eventargs. The node should have the ListObject of the item is bound to, so that can be used to determine what the key and text should be.

Children
No Data