Jump to content


Photo

Drag and Drop Within Grid.


  • Please log in to reply
5 replies to this topic

#1 Speed

Speed

    Senior Member

  • Members
  • PipPip
  • 207 posts
  • Gender:Male

Posted 04 December 2024 - 04:26 AM

Hi Boki,

 

Is it possible to drag and drop within a grid?

 

Say, for example. I want to drag and drop a cell onto another cell in the same column, or a different column.

 

= Steve

 



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,230 posts
  • Gender:Male

Posted 04 December 2024 - 12:10 PM

Hello Steve,

 

Yes it is. There is an automatic drag and drop for tree column, but not for cell values.

 

I will try to write a small demo project for how to do it manually. So I will just made that you transfer values with a mouse.


boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 Speed

Speed

    Senior Member

  • Members
  • PipPip
  • 207 posts
  • Gender:Male

Posted 05 December 2024 - 03:25 AM

Hi Boki,

 

That would be great.  Thank you!

 

= Steve



#4 Speed

Speed

    Senior Member

  • Members
  • PipPip
  • 207 posts
  • Gender:Male

Posted 11 December 2024 - 08:52 AM

Is there a way to work out which cell is at the X,Y coordinates in the DragOver event, eg. procedure TfrmMain.grdDayPlannerDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean)?



#5 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,230 posts
  • Gender:Male

Posted 12 December 2024 - 12:29 AM

Hi,

 

Sorry for delay, I'm attaching the demo. Hope it will help :)

 

Attached File  dragdrop.zip   7.03KB   2 downloads


boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#6 Speed

Speed

    Senior Member

  • Members
  • PipPip
  • 207 posts
  • Gender:Male

Posted 12 December 2024 - 03:51 AM

Hi,

 

Sorry for delay, I'm attaching the demo. Hope it will help :)

 

attachicon.gif dragdrop.zip

No problem at all. 

 

That's perfect!  Thank you so much.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users