Ticket T1284243
Visible to All Users

How to show the Treelist child node with same id to different parent

created 4 days ago (modified 4 days ago)

Hi Team,
There is a requirement in the treelist i am having a child nodes where id value is same for both records but the some column values are different (example it has amount columns which are different) which is mapped to two different parentids.
When the treelist is opened i can see that it is showing in both places but the value is taken from one of the child record.

Clipboard-File-1.png
Clipboard-File-2.png

Is there any way to show the value based on the mapped child node.

Please share some code snippet or ideas to achieve this.

If i try to generate some ids for the two rows and mapped means the values are showing correctly. but the Keyexpression field we cannot change, it works only if we need to use the unique id as Keyexpression as i generated then can you please let me know in multiple places we are using the
getSelectedRowKeys() and getSelectedNodeKeys is there any way to get the id column from it.

Similarly i am having a dropdown where it binded to TreeView same needs to be achieved in that as well.

Comments (1)
A A
Assylbek (DevExpress Support) 4 days ago

    Hello,

    TreeList requires each data entry to have a unique key to function correctly. If your dataset contains duplicate keys, consider creating a separate field with unique IDs for all data entries and setting it as the keyExpr. This field can remain hidden while serving as a unique identifier for data retrieval, selection, and focus.

    If you encounter any issues with this approach, please share a working sample demonstrating the issue so we can analyze and debug it effectively. You can extract one of our demos into a stand-alone example and demonstrate your implementation:

    • Press "Copy To …" to extract a demo into a stand-alone example;
    • Modify the example and use the "Save" button to apply changes and generate a new link;
    • Share the updated link here for further examination.

    Regards,
    Assylbek

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.