Adding a 2nd datagrid to a stack

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Adding a 2nd datagrid to a stack

Post by marksmithhfx » Wed Sep 30, 2020 6:19 pm

Looking for some advice on this topic. First, is it possible to have 2 data grids in a stack, and 2nd, even if possible, is it advisable? Are there any known issues with doing this?

PS the 2nd datagrid is probably not "functionally" necessary as a DG, but I was hoping to maintain a particular UE throughout the app and having 2, one for primary data collection, and the second for a simpler task of selecting categories, seemed the best approach.

Thanks
Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

Klaus
Posts: 13822
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Adding a 2nd datagrid to a stack

Post by Klaus » Wed Sep 30, 2020 6:27 pm

Hi Mark,
marksmithhfx wrote:
Wed Sep 30, 2020 6:19 pm
First, is it possible to have 2 data grids in a stack, and 2nd, even if possible, is it advisable? Are there any known issues with doing this?
Yes.
Yes.
No.

Since every datagrid has its own "Data Grid Template 1234556778899" substack, there will be no problems.
Use as many DGs as you need to, no known issues so far.


Best

Klaus

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Adding a 2nd datagrid to a stack

Post by dunbarx » Wed Sep 30, 2020 8:42 pm

Hi.

What Klaus said.

A dataGrid is just a complex LC "object", a grouped bunch of controls with behaviors and other functionality resident. It is lovely and very powerful. And complex.

So it is nothing particularly special in the sense you implied, as if it was something apart from LC per se, like an external DB for example.

Craig

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: Adding a 2nd datagrid to a stack

Post by marksmithhfx » Thu Oct 01, 2020 9:42 am

dunbarx wrote:
Wed Sep 30, 2020 8:42 pm
So it is nothing particularly special in the sense you implied, as if it was something apart from LC per se, like an external DB for example.

Craig
Hi,
Thanks Klaus and Craig. Very reassuring. My concern initially arose when I went to add a second datagrid to my project. The first time I just dragged it from the tools palette. This time, no matter how "hard" I tried to drag it from the tools palette, all I got was a funny looking <> arrow thing (as a cursor) and no DG. That had me puzzled. How was I supposed to implement a 2nd one? Eventually, and quite accidentally, I discovered that if I used a 2-finger swipe to drag the DG from the tools palette, I was successful. So, the fact there was a mysterious process to getting a 2nd DG made me question whether this was an advisable course of action. Happy to say it is working fine, and fits the bill for "fitting in" with the rest of the app design.

Cheers,
Mark
Last edited by marksmithhfx on Sun Oct 04, 2020 3:24 pm, edited 1 time in total.
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

Klaus
Posts: 13822
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Adding a 2nd datagrid to a stack

Post by Klaus » Thu Oct 01, 2020 10:03 am

You can also doubleclick an object in the TOOLS palette!

mrcoollion
Posts: 720
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Re: Adding a 2nd datagrid to a stack

Post by mrcoollion » Thu Oct 01, 2020 11:17 am

I also have had the problem that I could not add a new Datagrid on a card where already a Datagrid existed (Windows 10 ). However in LC 9.6.1. I cannot reproduce it.

Workaround for me is:
In the Menu : Object > New Control > DataGrid.

Regards,

Paul

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: Adding a 2nd datagrid to a stack

Post by marksmithhfx » Sun Oct 04, 2020 3:24 pm

Klaus wrote:
Thu Oct 01, 2020 10:03 am
You can also doubleclick an object in the TOOLS palette!
Ahhhh, did not know that. Thanks!
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Adding a 2nd datagrid to a stack

Post by dunbarx » Sun Oct 04, 2020 4:54 pm

I also have had the problem that I could not add a new Datagrid on a card where already a Datagrid existed
I can drag or double-click as many DG's as I like. I am on a Mac, of course.

Is this possibly a Windows thing? Anyone else see this? If so, it needs to go to the team right away.

Craig

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: Adding a 2nd datagrid to a stack

Post by marksmithhfx » Sun Oct 04, 2020 10:55 pm

dunbarx wrote:
Sun Oct 04, 2020 4:54 pm
Is this possibly a Windows thing? Anyone else see this? If so, it needs to go to the team right away.
I'll do some more testing tomorrow and report it if I still have problems. This was on a Mac, and was not even on the same card as the previous control. It was a brand new blank card in the stack. I was able to drag any of the controls off the tools palette to the card, just not a DG.

Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

SWEdeAndy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 261
Joined: Sat Aug 16, 2008 9:48 am
Location: Stockholm, Sweden
Contact:

Re: Adding a 2nd datagrid to a stack

Post by SWEdeAndy » Tue Oct 06, 2020 11:55 am

marksmithhfx wrote:
Sun Oct 04, 2020 10:55 pm
dunbarx wrote:
Sun Oct 04, 2020 4:54 pm
Is this possibly a Windows thing? Anyone else see this? If so, it needs to go to the team right away.
I'll do some more testing tomorrow and report it if I still have problems. This was on a Mac, and was not even on the same card as the previous control. It was a brand new blank card in the stack. I was able to drag any of the controls off the tools palette to the card, just not a DG.
I've also experienced exactly this problem on Mac. But it must have been pre 9.6.1, because now I get no such problem (at least when just creating a new stack and dragging DGs onto it).
Andreas Bergendal
Independent app and system developer
WhenInSpace: https://wheninspace.se

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: Adding a 2nd datagrid to a stack

Post by marksmithhfx » Tue Oct 06, 2020 7:58 pm

Apologies for the delay getting back. So I tested this out in 2 different stacks, one of which was the same one I had the problem in before, and I could not reproduce the problem. Gremlins in the system I suppose. Anyway, this does not appear to be a major recurring problem.

Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”