0

I'm working in Angular 8, jqgrid working perfectly.

Is there a way I can alter the drag and drop image when DnD between two grids?

I'm playing with:

      this.jqgSource.jqGrid(
        'gridDnD',
        {
          connectWith: this.jqgSelectorTarget,
          onstart: (ev, ui) => {
            $(this).html("new content here");
          },
          ondrop: (ev, ui, dragdata) => {
            const registrationId = dragdata.registrationId;
            const moveToTeamId = this.targetTeamId;
            this.swapComplete(registrationId, moveToTeamId);
          }
        });

but no luck...

Todd Greenwald
  • 149
  • 2
  • 6
  • I'm not sure that I correctly understand which image you mean because one don't use any image for that. Look at [the demo](http://www.ok-soft-gmbh.com/jqGrid/OK/gridDnD-dropPosition.htm) from [the old answer](https://stackoverflow.com/a/30782494/315935) or [another demo](http://www.ok-soft-gmbh.com/jqGrid/gridDnD-and-sortableRows4.htm) created for [more old answer](from https://stackoverflow.com/a/10196208/315935). I hope the demos/answers will help you. – Oleg Jan 03 '20 at 19:10
  • Oleg, thanks for your comments, I'm trying to build on the examples you provided. What I'm trying to alter is content not style (the drag object contains all the columns I'm aiming to show only the critical columns so that the object isn't so wide and it's clearer how to drop). Can I alter the content through ui.helper? – Todd Greenwald Jan 04 '20 at 16:28

1 Answers1

0

Oleg got me going.

To change the content of the dragged object

Instead of:

$(this).html("new content here")

I needed to access the ui.helper:

ui.helper.html("new content here")
Todd Greenwald
  • 149
  • 2
  • 6