DataGrid problems
pink
nabble at mad.pink
Tue Dec 26 13:58:40 EST 2017
I must confess that I haven't really used the data grid much, so I'm at a
loss as to how to troubleshoot... And FYI I am using 8.1.8
I created a datagrid form with 6 fields and a graphic. The dgData is
generated from a search function in a large database. As an example, one
search yields 12 results.
My datagrid displays 12 groups for the results, but only the first one is
filled in (with the results of the last record). If I get the dgData, it is
all there.
I setup a mouseup (see below) in the script to give me the id number
associated with a group, and they each have their own id number when
clicked. Note, that the first group which displays the last record gives me
the id number of the first record.
It seems as though the first group created by the datagrid gets rewritten
instead of going down the list...
What did I do wrong?
my FillInData command:
on FillInData pDataArray
set the text of field "name" to pDataArray["name"]
set the text of field "address" to pDataArray["address"]
set the text of field "age" to pDataArray["age"]
set the text of field "homephone" to pDataArray["homephone"]
set the text of field "cellphone" to pDataArray["cellphone"]
set the text of field "elig" to pDataArray["elig"]
if pDataArray["elig"] is space then
set the backgroundColor of grc "indicator" to green
else
set the backgroundColor of grc "indicator" to red
end if
end FillInData
on mouseUp
put the dgData of me into tData
put the dgIndex of me into tX
put tData[tX]["_id"] into tID
answer tID
end mouseUp
-----
---
Greg (pink) Miller
mad, pink and dangerous to code
--
Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html
More information about the use-livecode
mailing list