Drag Re-order Datagrid Mobile

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
hrcap
Posts: 131
Joined: Mon Jan 14, 2019 5:20 pm

Drag Re-order Datagrid Mobile

Post by hrcap » Wed Sep 16, 2020 3:42 pm

Afternoon All

I have managed to implement drag re-ordering for a datagrid using dragstart and dragDrop which works on Desktop.

Before I start from scratch at tackling Mobile drag re-ordering for a datagrid does anyone have any examples?


Many Thanks

elanorb
Livecode Staff Member
Livecode Staff Member
Posts: 516
Joined: Fri Feb 24, 2006 9:45 am

Re: Drag Re-order Datagrid Mobile

Post by elanorb » Mon Sep 21, 2020 12:27 pm

Hi

DataGrid forms have re-ordering features built in. You set the dgEditMode property of the DataGrid to true which will show the default edit options. One of these is a reorder control which allows you to drag-reorder the rows of the DataGrid.

These controls can be customised if you need.

If a DataGrid form will work in your project I would suggest having a look at that option before trying to implement it yourself.

Kind regards

Elanor
Elanor Buchanan
Software Developer
LiveCode

hrcap
Posts: 131
Joined: Mon Jan 14, 2019 5:20 pm

Re: Drag Re-order Datagrid Mobile

Post by hrcap » Mon Sep 21, 2020 1:27 pm

Well this would have saved me a lot of work 😂

Thats excellent thank you very much. I have just built a little test file of this and it works really well.

I'll start having a look into this in more detail later today with how to 'make things happen' off of the back of the re-ordering.

For reference for anyone else viewing this the link to the LiveCode Page for help on this is:

https://livecode.com/docs/9-5-0/whats-n ... ase-notes/



Thank you very much, much appreciated

elanorb
Livecode Staff Member
Livecode Staff Member
Posts: 516
Joined: Fri Feb 24, 2006 9:45 am

Re: Drag Re-order Datagrid Mobile

Post by elanorb » Tue Sep 22, 2020 10:23 am

Glad I could help!

Kind regards

Elanor
Elanor Buchanan
Software Developer
LiveCode

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”