Tring in vain to populate a data grid

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
Pascal
Posts: 19
Joined: Sat Jul 10, 2010 2:06 pm
Contact:

Tring in vain to populate a data grid

Post by Pascal » Fri Jul 23, 2010 4:09 pm

Hello,

I join a stack in which I try to place values from fields in different cards to a data grid.
I use a global variable to tell Rev the line where data is suppose to go, but it never goes there. It always goes to the first line, each new entry erasing the one already there. Any idea ?

Thanks
Attachments
Test.zip
(6.48 KiB) Downloaded 268 times
Pascal (French, sorry for the way I write)
RevEnterprise 4.5.0 dp3 OSX 10.4.11

doc
Posts: 148
Joined: Fri Jun 09, 2006 4:30 pm

Re: Tring in vain to populate a data grid

Post by doc » Sat Jul 24, 2010 12:36 am

Sorry, but I get an error message from Rev stating:

"There was a problem opening that stack"
"file is not a stack"

I'm guessing that maybe the file may have been corrupted or something, but it will not open for me in Rev in order to have a look.
It always goes to the first line, each new entry erasing the one already there. Any idea ?
When I run into that general type of problem, it's usually because I forget to point the data "after" line such and such.
put fld "mydata" &cr after the targeted variable/field/table etc.

-Doc-

Pascal
Posts: 19
Joined: Sat Jul 10, 2010 2:06 pm
Contact:

Re: Tring in vain to populate a data grid

Post by Pascal » Sat Jul 24, 2010 8:02 am

Hello,

You're right.
I deziped the file and, me too, I have not succeed in opening the stack (corrupted).
The stack has been compressed with Zipit. I'll try another soft to do it.
Before I'll try your "after"

You will find underneath the script used to populate my DataGrid.

on mouseUp -- script of a button called "Validate" used after data have been entered in a form

Global NbLiGr1 -- the global used to tell in which line (row) to place the data
add 1 to NbLiGr1

put the value of field "FNOM" into LesData[NbLiGr1]["NOM"]
put the value of field "FLogin" into LesData[NbLiGr1]["LOGIN"]
put the value of field "FPword" into LesData[NbLiGr1]["Mot de passe"]

go card id 1002 -- the card of the grid

set the dgData of group "Grille1" to LesData -- do not see where I could place an "after"' :(

end mouseUp
Pascal (French, sorry for the way I write)
RevEnterprise 4.5.0 dp3 OSX 10.4.11

Pascal
Posts: 19
Joined: Sat Jul 10, 2010 2:06 pm
Contact:

Re: Tring in vain to populate a data grid

Post by Pascal » Sat Jul 24, 2010 11:05 am

Well I ziped/unziped the stack and everything seems allright.
Pascal (French, sorry for the way I write)
RevEnterprise 4.5.0 dp3 OSX 10.4.11

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Tring in vain to populate a data grid

Post by Dixie » Sat Jul 24, 2010 12:43 pm

Hi Pascal

I guess you haven't looked at your emails... Here is a little stack that I think will help point you in the right direction...

hope it helps

Dixie
Attachments
Simple Datagrid Table.zip
(6.32 KiB) Downloaded 300 times

Pascal
Posts: 19
Joined: Sat Jul 10, 2010 2:06 pm
Contact:

Re: Tring in vain to populate a data grid

Post by Pascal » Sun Jul 25, 2010 3:54 pm

Thanks Dixie.

It do works fine. :)
Pascal (French, sorry for the way I write)
RevEnterprise 4.5.0 dp3 OSX 10.4.11

Post Reply