Updating a data grid

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

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Updating a data grid

Post by Simon » Tue Jan 07, 2014 12:54 am

Hi TY,
I haven't fooled around with datagrids in a while so I thought I'd give your stuff a try:
2014-01-06_1551.png
2014-01-06_1551.png (6.52 KiB) Viewed 7491 times
It's all working, just listen to Klaus and make the changes.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

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

Re: Updating a data grid

Post by Klaus » Tue Jan 07, 2014 1:39 am

Hi Ty,
tyarmsteadBUSuSfT wrote:Actually it was to set the array in the preopencard
OK.
tyarmsteadBUSuSfT wrote:... and pass to the fillindata of the data grid.
That handler of the "row behavior" will automatically be called when setting
"the dgdata of grp DG666" as I wrote earlier.

The only thing YOU need to do is to "set the dgdata..." :D


Best

Klaus

tyarmsteadBUSuSfT
Posts: 151
Joined: Sat Aug 25, 2012 1:14 am

Re: Updating a data grid

Post by tyarmsteadBUSuSfT » Tue Jan 07, 2014 2:09 am

/Users/tyronearmstead/Desktop/card.tiff
I appreciate your help, but I am getting empty forms on the data grid or I am getting one form and it is just replace the data as I step thru it. Are you placing the creation of the array within the fillindata or outside of the data grid such as the preopencard? It must be the -10 weather that has my brain frozen, I've been with this all day.
Not sure if the picture will upload or not. I have it set to forms when I have the category and time name then the description and picture next to it. I have not worried about the other fields as I just wanted it to populate the basics first.
Thank you,
Ty

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Updating a data grid

Post by Simon » Tue Jan 07, 2014 5:23 am

Hi Ty,
Not sure who your last post was directed at, but I can keep talking.
All the pDataArray stuff is in the button just like the code Klaus posted.
The FillInData contains;
set the text of field "Category" of me to pDataArray["Category"] etc.
I am getting one form and it is just replace the data
Check that you have Fixed Row Height unchecked. :)

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

tyarmsteadBUSuSfT
Posts: 151
Joined: Sat Aug 25, 2012 1:14 am

Re: Updating a data grid

Post by tyarmsteadBUSuSfT » Tue Jan 07, 2014 2:24 pm

Simon,
That is what I have done
-fix row height was unchecked
-set the text of field "category" of group "wishlist" to pDataArray["category'], etc is in the fillindata
just as Klaus inidicated as with the array set up.
If I have four lines of itemss in the file I am getting four empty forms on the card. The forms are the correct height, color and width.
I'll just start over maybe I have something in there that I am missing.
I tried to post the screen shot, but that didn't come though.
Thank you for all of patience and help.
Ty

tyarmsteadBUSuSfT
Posts: 151
Joined: Sat Aug 25, 2012 1:14 am

Re: Updating a data grid

Post by tyarmsteadBUSuSfT » Tue Jan 07, 2014 2:32 pm

Also, often when it getes to the set the dgdData of group.... the datagrids emptys and the templates are even gone. But if I comment out the set the dgData the templates will remain althought empty.
Ty

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

Re: Updating a data grid

Post by Klaus » Tue Jan 07, 2014 2:45 pm

Could you please post (a stripped down) version of your stack?
Guessing is ineffective and I already said everything to make it work,
so i need to take a look! :D

tyarmsteadBUSuSfT
Posts: 151
Joined: Sat Aug 25, 2012 1:14 am

Re: Updating a data grid

Post by tyarmsteadBUSuSfT » Tue Jan 07, 2014 3:10 pm

Klaus,
I am sorry for the frustration. Thank you for looking at this.
Ty
Attachments
Test File.livecode 2.zip
requested stack
(131.4 KiB) Downloaded 194 times

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

Re: Updating a data grid

Post by Klaus » Tue Jan 07, 2014 3:49 pm

Hi Ty,

please make your and my life a TAD easier and
1. also supply your TEXT FILE "ItemList.txt" or put it into a field in that stack!
2. give a little instruction on WHAT to do and WHERE to click to make it (not) work!
3. GROUP and ENABLE the raidobuttons in the template or is this intended behavior?


Best

Klaus

tyarmsteadBUSuSfT
Posts: 151
Joined: Sat Aug 25, 2012 1:14 am

Re: Updating a data grid

Post by tyarmsteadBUSuSfT » Tue Jan 07, 2014 4:21 pm

I put the item file in data grid on a card.
The idea is to enter an item name then description and category. the use can select a priority radio button. Then save location and map are not working as I did not include the Merg files and cards. The only card active other than the main entry is the WishList Card and to get to it selected the temp button "wish list" button.
It doesn't allow me to upload a txt file.
Thank you again
Ty
Attachments
Test File.livecode 3.zip
(138.8 KiB) Downloaded 184 times

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

Re: Updating a data grid

Post by Klaus » Tue Jan 07, 2014 4:28 pm

Now you have a TABLE datagrid with NO row behavior and so no "FillInData" handler?
How would you fill the data from your external file?
No scripts in the stack that handle this! What shall I do? 8)

tyarmsteadBUSuSfT
Posts: 151
Joined: Sat Aug 25, 2012 1:14 am

Re: Updating a data grid

Post by tyarmsteadBUSuSfT » Tue Jan 07, 2014 4:44 pm

Klaus all I wanted to do was send the txt file. I thought you could copy it out of the contents. How should I send youth text file?
TY

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

Re: Updating a data grid

Post by Klaus » Tue Jan 07, 2014 4:55 pm

Hi Ty,

ah, I thought you were sending a new stack WITH the file content in it so I was a bit irritated 8)
Will copy the text from the last attachment!


Best

Klaus

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

Re: Updating a data grid

Post by Klaus » Tue Jan 07, 2014 5:26 pm

Hi Ty,

sigh, the stack and its script looks like I did not give any hint here in this thread!? :(

Please check the new stack, I only made the "fill the datagrid with an array" thing work.
And check the ROW BEHAVIOR!


Best

Klaus
Attachments
tfm2.livecode.zip
(131.96 KiB) Downloaded 190 times

tyarmsteadBUSuSfT
Posts: 151
Joined: Sat Aug 25, 2012 1:14 am

Re: Updating a data grid

Post by tyarmsteadBUSuSfT » Tue Jan 07, 2014 5:48 pm

Klaus,
Thank you so very much!! I think I got so frustrated I started circular reasoning.
Thank you. You and your team of support are certainly top drawer!
Ty

Post Reply