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!
Hello, I have a datagrid Form and trying to update row in a repeat loop, I confirm the array is being changed, I am just having trouble making it update on screen when repeat loop is done:
on mouseUp
put the dgData of group "formGrid" into theDataA
put the dgIndexes of group "formGrid" into theIndexes
repeat for each item theIndex in theIndexes
put theDataA[theIndex]["Status"] into tStatus--this value is already in record
if tStatus= "true" then
put "pic.png" into theDataA[theIndex]["pic"]
else
send "DeleteIndex theIndex" to grp "formGrid"
end if
end repeat
-- I would like to repopulate datagrid with only the records that are left
send "RefreshList" to grp "formGrid" --update changes but I suspect this does not put records left at top
end mouseUp
Thanks for any help
Edit: fixed typo
Last edited by newpie on Sat Mar 26, 2016 3:27 pm, edited 1 time in total.
on mouseUp
put the dgData of group "formGrid" into theDataA
put the dgIndexes of group "formGrid" into theIndexes
repeat for each item theIndex in theIndexes
put theDataA[theIndex]["Status"] into tStatus--this value is already in record
if tStatus= "true" then
put "pic.png" into theDataA[theIndex]["pic"]
else
send "DeleteIndex theIndex" to grp "formGrid"
end if
end repeat
set the dgData of group "formGrid" to theDataA
dispatch "RefreshList" to grp "formGrid"
end mouseUp