Yes, only work on desktop, on mobile devices don't work.
Yes, but how pass the "data" of the image to the img control of the row? I'm blocked.

Any idea?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Code: Select all
on FillInData pDataArray
   Global aData
   
   set the text of field "Label" of me to pDataArray["label 4"]
   set the text of field "Label2" of me to pDataArray["label 3"]
   set the text of field "Label3" of me to pDataArray["label 5"]
   
   if pDataArray["Label 1"] is 1 then
      put URL pDataArray["label 6"] into img "f_image" of me
      set the text of field "Label2" of me to pDataArray["label 2"]
   else
      put img "NoImage" into img "f_image" of me -- otherwise put in a placeholder image
      put the dgindex of me into tIndex --grab the index
      
      put tIndex into aData[pDataArray["label 6"]]["Id_row"] --Store the index of the row
      
      load URL pDataArray["label 6"] with message "refreshDg" --load and call "refreshdg" which is a handler on the card
      
   end if
Code: Select all
command refreshDg pURL, pStatus, pData
   Global aData
   
   switch pStatus
      case "cached"
         put aData[pURL]["Id_row"] into tIndexRow
         get the dgDataOfIndex[tIndexRow] of group "DataGrid1" 
         put it into tData
         
         put 1 into tData["Label 1"] 
         put tIndexRow into tData["Label 2"] -- to test if the value is returned
         
         set the dgDataOfIndex [tIndexRow] of group "DataGrid1" to tData -- then pop it right back in, no changes needed.
         break
   end switch
end refreshDg
 
 Code: Select all
command refreshDg pURL, pStatus, pData
   Global aData
         put aData[pURL]["Id_row"] into tIndexRow
         get the dgDataOfIndex[tIndexRow] of group "DataGrid1" 
         put it into tData
         
         put 1 into tData["Label 1"] 
         put URL pURL into tImageData
         put tImageData into tData["Label 2"] -- to test if the value is returned
         
         set the dgDataOfIndex [tIndexRow] of group "DataGrid1" to tData -- then pop it right back in, no changes needed.
end refreshDg
Code: Select all
on FillInData pDataArray
   Global aData
   
   set the text of field "Label" of me to pDataArray["label 4"]
   set the text of field "Label2" of me to pDataArray["label 3"]
   set the text of field "Label3" of me to pDataArray["label 5"]
   
   if pDataArray["Label 1"] is 1 then
      put pDataArray["label 2"] into img "f_image" of me
   else
      put img "NoImage" into img "f_image" of me -- otherwise put in a placeholder image
      put the dgindex of me into tIndex --grab the index
      
      put tIndex into aData[pDataArray["label 6"]]["Id_row"] --Store the index of the row
      load URL pDataArray["label 6"] with message "refreshDg" --load and call "refreshdg" which is a handler on the card
   end if
end FillInData

well, then script:...but the callbackmessage seems is diferent, "cached" on desktop and "donwloaded" on device.
Code: Select all
...
switch pStatus
case "cached"
case "downloaded"
  ## do stuff here...
...
Now what? Does it work or not? Or only seems to work?This code is working on devices, ... But seems don't work.