PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Dragging cells within table  (Read 978 times)

Cedric

  • Silver Member
  • ***
  • Posts: 25
    • View Profile
Dragging cells within table
« on: August 28, 2020, 04:59:17 AM »
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

  • Staff
  • Gold Member
  • *****
  • Posts: 63
    • View Profile
    • PVX Plus Technologies Ltd.
Re: Dragging cells within table
« Reply #1 on: August 28, 2020, 08:25:02 AM »
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

  • Staff
  • Gold Member
  • *****
  • Posts: 63
    • View Profile
    • PVX Plus Technologies Ltd.
Re: Dragging cells within table
« Reply #2 on: August 31, 2020, 10:06:37 AM »
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.