Datagrid

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
parsec
Posts: 27
Joined: Fri Jan 09, 2015 5:24 pm

Datagrid

Post by parsec » Sun Jul 26, 2015 7:52 pm

Hello
is any way to be able to pick the column names under the property inspector setup provide you have connected to a database and have select a table.
as of now I have to open the database and copy and paste or manually enter the column names
also in the edit script have to find the columns go from there
Thank you
J

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10331
Joined: Wed May 06, 2009 2:28 pm

Re: Datagrid

Post by dunbarx » Sun Jul 26, 2015 9:33 pm

Hi.

Have you played with the "dgColumnName" property? Read about it in the dg manual, page 216.

Craig NEwman

parsec
Posts: 27
Joined: Fri Jan 09, 2015 5:24 pm

Re: Datagrid

Post by parsec » Sun Jul 26, 2015 9:57 pm

I have seen that but I still do not see were I can do what I like to do
I am able to connect to a DB
What I was looking to do is to be able to select a table and then select the columns that I want to have on the my dgData as Columns_Names/Header and Labels . I have read the manual on the subject but I cant find a way to do that from the property inspect
thank you
perhaps I miss something

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Datagrid

Post by Klaus » Mon Jul 27, 2015 12:46 pm

Hi parsec,

"datagrids" are the most complex objects EVER in Livecode

Most of the dg functionality can only be SCRIPTED, so I'm afraid
you need to do some reading and experimenting first.

Go here and check all the lessons and/or download hte PDF documentation,
it's the only docs we have for datagrids:
http://lessons.runrev.com/m/datagrid


Best

Klaus

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 755
Joined: Fri Jun 27, 2008 9:00 pm

Re: Datagrid

Post by Mikey » Mon Jul 27, 2015 3:03 pm

For my apps, I pre-set the columns, widths, labels, etc. right in my datagrid, without scripting it. I have just found that to be easier than doing it dynamically. If you have to do it dynamically, then you should check out the datagrid manual. It is a very good reference and very complete.

For your question, check out the API and Properties section, which starts at page 209. For scripting the column headers, labels, etc. check out page 213-214.

Datagrids are very easy to use with databases without having to screw around, so if, after checking out the manual, you are having issues, chances are you are trying too hard.

Post Reply