Unplanned
Last Updated: 27 Oct 2020 13:47 by ADMIN
David
Created on: 26 Oct 2020 14:57
Category: TreeList
Type: Bug Report
1
TreeList reorderable does not work when the parentId field has a different name

Bug report

Ticket ID: 1489274

The TreeList reorderable functionality does not work when using a different field name for the parentId (not the default parentId).

Reproduction

In the example below the treelist with parentId: ''parentId" works well when you drag Carla under Ashley. But in the second treelist, Carla disappears 

[Dojo]

Environment

* **Kendo UI version:** 2020.3.915

1 comment
ADMIN
Alex Hajigeorgieva
Posted on: 27 Oct 2020 13:47

Hello, David,

Thank you for reporting this issue. I have also logged it in our public repository at:

https://github.com/telerik/kendo-ui-core/issues/6094

Meanwhile, you can use the data source schema mapping feature fields.fieldName.from that will allow you to still use a custom-named parentId field:

https://dojo.telerik.com/@bubblemaster/efiFObaC

 

schema: {
        model: {
          id: "id",
          parentId: "parentId",
          expanded: true,
          fields: {
            id: { type: "string" },
            parentId: { from: "customParentFieldIdentifier", type: "string", nullable: true }
          }
        }
      },

 

Regards,
Alex Hajigeorgieva
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.