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 & drop between grids not working

(0) ShareShare
ReportReport
Posted on by 605

I have two data grids that I want to allow dragging from one grid and dropping on the other.  The source grid seems to work fine as I can start dragging from it and drop it on other grids or objects, but it wont' droop on my target grid.  The curson never changes from the no allowed cursor until off that grid.  What criteria would cause the target grid to not be able to accept the drop?

Tom T.

*This post is locked for comments

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

    Hi Tom,

    This is not possible with the existing Ax controls. Though a drop action will be received it is not possible to find on which record it was dropped. The tree control has this option of finding the node on which the drop was made by usting this.hittext(x,y) function. The BOM Designer form is a good example to inspire from(Item -> Bom Designer). There drag and drop is implemented between tree and grid.

    You may want to reconsider your design to use a tree or probably use a List control as in UserGroup settings.

  • tturney Profile Picture
    605 on at

    Kamal,

     Thank you for your response.  I actually don't need to know the row of the grid the drop is on, only that the grid is dropped on.  I am dragging an item code from one grid onto another that displays inventory for that item.  As long as I can drop anywhere on the grid, I can re-populate the target grid with that inventory item.  For some reason, the target grid in my project won't accept drops.

    Tom

  • Suggested answer
    Community Member Profile Picture
    on at

    Tom,

    If all that you need is the event then i think it works. Set the "DragDrop" property on the Grid to "Manual" once this is done on both the grids then you are good to go. On the drop method you get the dragSource as FormControl. You can then use to identify the datasource and then retrieve the appropriate record. This works in the same form as well as different form. But make sure you build the appropriate validations to prevent drag and drop from the same grid.

  • tturney Profile Picture
    605 on at

    Kamal,

     Thank you again for your prompt response.  What other settings or parameters would cause a grid not to except drops?  The grid has dragdrop set to manual and when I drag from the first grid, the cursor changes to the not allowed (circle with bar through it) form.  If I set the other controls on the form to dragdrop manual, they will except the drag from the same source grid, but the target grid won't.

    Tom

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
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans