More help request with DataGrids pls

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
Traxgeek
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 281
Joined: Wed Jan 09, 2013 10:11 am

More help request with DataGrids pls

Post by Traxgeek » Fri Sep 06, 2013 8:30 am

Hi,

I have created two DG objetcs - both as forms (as opposed to tables).

I have the first one working correctly :-) ... so I move on to the second one...

whereupon I think... hmm, they're pretty similar, so (being of a rather lazy disposition) I think I'll copy some of the controls from the first DG to the second; then, the two DGs will look similar... I then go about modifying my second DG using the copied in controls as my 'starter for 10'... Cunning plan ! - or so I think...

WRONG !

Now, when I populate the first DG, the second one gets (partially) populated at the same time...

I guess this has something to do with (hidden from my basic underlying knowledge of the DG control) references made to the templates... but, how to fix ? Or do I just create all DGs from scratch ?

Anyone able to give me a kick in the right direction please ?

Thanks a mil.
I'm 'getting there'... just far too slowly !
Mac (Siera) and PC (Win7)
LiveCode 8.1.2 / 7.1.1

makeshyft
Posts: 222
Joined: Mon Apr 15, 2013 4:41 am
Contact:

Re: More help request with DataGrids pls

Post by makeshyft » Mon Sep 09, 2013 12:24 am

The only time i had issues with this is when I forgot to paste INTO the template GROUP not just the card that contains the template. Make sure that everything is INSIDE THE GROUP.

The other thing is to remember the "of me" reference in all your lines that populate your grid.
Founder & Developer @ MakeShyft R.D.A - https://www.makeshyft.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com

Traxgeek
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 281
Joined: Wed Jan 09, 2013 10:11 am

Re: More help request with DataGrids pls

Post by Traxgeek » Tue Sep 10, 2013 8:54 am

Hi Tom,

Thanks for that. Works like a charm !

I'm not sure whether I was just getting over-tired the other day or whether I really had an issue - I'm off to check again... but what I was doing was to :
highlight the controls I wished to copy in my starting DG,
hit, 'EDIT 'and then 'COPY OBJECTS' (using the Ctrl/cmd 'C' doesn't always copy ALL selected controls)
Close the starter DG
Open my new DG
Select 'ROW TEMPLATE' from the 'PROPERTIES 'dialogue
Select the Template (in that DG) and then right click/double finger click and select 'EDIT GROUP'
Finally, hit 'PASTE'

But, like I say, I seemed to get some odd behaviour when I came to run my scripts to populate the DGs...

Your 'PASTE INTO' works just great (without electing 'EDIT GROUP')

Just brilliant. Saves loads a time !

Thanks again.
I'm 'getting there'... just far too slowly !
Mac (Siera) and PC (Win7)
LiveCode 8.1.2 / 7.1.1

ronbird
Posts: 17
Joined: Wed Sep 18, 2013 9:27 am

Re: More help request with DataGrids pls

Post by ronbird » Wed Sep 18, 2013 9:42 am

Hi all
I'm having real problems with data on Android - it is the first time I've tried this.
I have collected a small amount of data, 30 fields worth, and can display it in a data grid, on Android.
I need to be able to somehow transfer that data to an email, or at least get it off the handset somehow(without doing a screen grab) but into an email would be best.
I have it working on a desktop but the copy command does not work on Android. I've been through so many lessons building SQLs, and mobileControlCreate s
but still not managed to achieve what I want.
Can any one help?
Thanks, Ron

MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: More help request with DataGrids pls

Post by MaxV » Wed Sep 18, 2013 10:34 am

What about the dgText of group yourDatagrid?
See http://livecode.wikia.com/wiki/Datagrid_API for more information.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

ronbird
Posts: 17
Joined: Wed Sep 18, 2013 9:27 am

Re: More help request with DataGrids pls

Post by ronbird » Wed Sep 18, 2013 11:13 am

Hi MaxV
Yes, I've done the 'put the dgData of group', rounded up all the data.
I used the Export data to XML script from the lesson How Do I Export Data From A Data Grid, but it is what to do with the data next I cant do.
'set the clipboardData' does not work on Android unfortunately otherwise it would have been finished days ago. I need some other command to get the data out of LiveCode.
I shall read through the documentation you recommended however as yet I see no mention of what to do for Android.
Thanks Ron

ronbird
Posts: 17
Joined: Wed Sep 18, 2013 9:27 am

Re: More help request with DataGrids pls

Post by ronbird » Wed Sep 25, 2013 9:46 am

Hi all, with lots of help from LiveCode's ever patient Neil Roger I have cracked this. I enclose an example of how to get small amounts of data out from an Android app without resorting to SQL.
The enclosed demo shows a random number generated in livecode. You navigate to the next page and the number is placed in a livecode text field, selecting the appropriately named button copies the number into an Android field where it can be selected and copied to the clipboard in the normal manner for Android. The Android field needs to be at the top of the screen as the lower half gets covered by the pop up keypad. I hope this resolves any problems others may have been having.
Attachments
reverse.livecode.zip
(2.84 KiB) Downloaded 281 times

Post Reply