Dragging cells within table

Started by Cedric, August 28, 2020, 04:59:17 AM

Previous topic - Next topic

Cedric

Hi,

I'm trying to make my appointment module a bit more user friendly and was trying to use the drag and drop feature within the same table.  Is that even doable in Pxplus?  I think not since cells do not have IDs?   

Susan Cryderman

Hello Cedric,

Yes - you can setup drag and drop from a grid control (GRID_1.CTL) to the same grid control.  If you then enter some PERFORM logic, this logic can do something like;

  r1=GRID_1.CTL'draggedrow,c1=GRID_1.CTL'draggedColno
  r2=GRID_1.CTL'droppedOnRow,c2=GRID_1.CTL'droppedOnColno

Once you have these drag and drop rows and columns - you can then use them to retrieve the current values (GRID_1.CTL'value$) and other properties of the cells as needed.

Susan Cryderman

Cedric,

One think I forgot to mention ...

You also need to disable the 'MultiSelect property on your grid control in order for the system to know the difference between selecting multiple cells and dragging a cell.