Forum


17:53

10/06/2009

Can someone show me how to load an image into a cell (based on a conditional). I want to show a green checkmark if some cell is "true" and blank otherwise.
This is not for editing purposes. All the docs and everything I could find related to images seems to be only about making cells editable.
Any help?
Hello Rottweiler,
Yes this can be done, I do it all the time for exactly the same reasons -- in a grid showing what's what (but no in-line editing) I hate to see True/False or Yes/No, so I handle it this way (your syntax may vary)
"Active" is a boolean field in my data; set the image
If Active
ActiveImage = "<img border='0' src='" + path and name of checked image + "' alt='' />"
Else
ActiveImage = "<img border='0' src='" + path and name of empty checkbox + "' alt='' />"
EndIf
If you are going to edit these records in a form, then add a hiddenfield with the raw data
Incude both fields in your output string
lcXMLContent = lcXMLContent ;
+ CRLF + [<row id = "] + somerowID value + [">] ;
several other fields on this row
+ CRLF + "<cell><![CDATA[" + lcActive + "]]></cell>" ;
+ CRLF + "<cell><![CDATA[" + lcActiveImage + "]]></cell>" ;
+ CRLF + [</row>]
Hope this helps
Reg
Most Users Ever Online: 715
Currently Online:
55 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66