web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Drag and drop between Grid and Tree

(0) ShareShare
ReportReport
Posted on by

Hi,

i have a form with a Grid and a Tree. I want to drag Items from the grid to tree.

any Suggestion?

Thanks

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    give me the form name pls

  • Community Member Profile Picture
    on at

    I want to have a Form like a BomDesigner. But i'm new in AX and i couldnt get it, how BomDesigner works.

  • Suggested answer
    Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    It's implemented by overriding tree's methods such as beginDrag() and dragLeave(). You can play with a simpler implementation in Tuturial_Form_TreeControl form.

  • Community Member Profile Picture
    on at

    I did override begindrag, drop, dragover and ... I can drag and drop the nodes in Tree. But i want to drag an item in my Grid on the right and drop it to tree on the left of my form. So, i dont know, how can i access the RecId of the selected data and give it to tree.

  • Suggested answer
    Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    To be honest, I've never seen that, so I assume it's not possible. You can use a list, though (as BomDesigner does), and override similar methods there.

  • Verified answer
    Community Member Profile Picture
    on at

    I did solve it myself :)

  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    Please tell how you achieve it; it may help somebody with a similar requirement. Did you find a way with grid after all? Or did you use a list, as I suggested?

  • Community Member Profile Picture
    on at

    I did find a way with grid. I'v overridden the drop method on Tree and in this mehtod with the help of Table.datasource().cursor().RecId (Table = datasource table in grid) get the RecId of the dragged item in Grid. And with dragsource().name and this.name you can find out whehter the dragged item is a grid item or a tree node :) ;)

  • Community Member Profile Picture
    on at

    I was thinking about this as well

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans