Populating Datagrids?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 2
- Joined: Mon Nov 23, 2015 5:50 pm
Populating Datagrids?
I need to get a text file into a datagrid and for it to display the data in three columns: the student name, student gender, and a yes or no. Please help me this is due tomorrow
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Populating Datagrids?
What does the data look like? If it's tab-delimited you can probably just set the dgText property:
http://lessons.livecode.com/m/datagrid/ ... -with-data
http://lessons.livecode.com/m/datagrid/ ... -with-data
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Populating Datagrids?
Hi.
What Richard said. If it is not tab and return delimited, ask again quickly, since you must format it that way before you can use the one-liner he suggested.
Craig Newman
What Richard said. If it is not tab and return delimited, ask again quickly, since you must format it that way before you can use the one-liner he suggested.
Craig Newman
-
- Posts: 746
- Joined: Sun Feb 04, 2007 11:01 pm
Re: Populating Datagrids?
Here's something to help you along. You don't need to set the itemDel unless you're going to refer to the parts of tData as items.
Code: Select all
put fld “FldName” into tData
set the itemDel to tab
put "Name" & tab & “Gender” & tab & “Answer” & cr into TheTextData
set the dgText [true] of grp "YourDataGrid" to TheTextData & tData
Tom
MacBook Pro OS Mojave 10.14
MacBook Pro OS Mojave 10.14