Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TreeList drag and drop functionality does not work when the Ids are stings(guids). #3142

Open
simonssspirit opened this issue May 2, 2017 · 6 comments

Comments

@simonssspirit
Copy link
Contributor

Bug report

TreeList drag and drop functionality does not work when the Ids are stings (guids).

Reproduction of the problem

The issue can be observed in the following Dojo: http://dojo.telerik.com/eQuJA

Environment

  • Browser: [all]
@ag-petrov
Copy link
Contributor

The described behavior is expexted. The treelist model expect a number for the parentId field and if such is not provided the widget will not be able to correctly set the parent id when drop is performed. In cases where string are used as ids our logic will try to parse them, that is why the scenario where the ids are number strings works. In order to avoid inconsistencies I suggest using numbers as ids.

@vdachev
Copy link

vdachev commented Sep 30, 2017

The treelist model expect a number for the parentId field

I don't seem to find a mention of this in the documentation. Moreover, I found a forum post that literally says:

... the TreeList should work fine with string type for the Id and the parent id properties.

@ag-petrov
Copy link
Contributor

Indeed the TreeList should work fine when the Id and ParendId are strings however these strings should contain numbers so they can be parsed. Please accept our apologies for the misleading post.

As for the documentation we will soon update it in order to avoid such confusion in future.

@guylhermetabosa
Copy link

guylhermetabosa commented Dec 26, 2017

Is this still the expected? I have ids with guid and works fine to me, should I be worried?

@ag-petrov
Copy link
Contributor

We have not applied any changes to the logic in regards of the above scenario. That said I suggest using numbers as ids.

@ag-petrov ag-petrov reopened this Oct 22, 2021
@vdachev
Copy link

vdachev commented Oct 23, 2021

Is there a particular reason the TreeList uses as IDs? We have objects that are identified by their GUIDs (e.g. Active Directory entries) that we need to show in a tree. We have to generate numeric IDs and keep a mapping just to show them on a TreeList.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants