Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Load an image into a cell
23/07/2010
17:53
Avatar
Rottweiler
Member
Members
Forum Posts: 7
Member Since:
10/06/2009
sp_UserOfflineSmall Offline

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?

25/07/2010
16:57
Avatar
Rottweiler
Member
Members
Forum Posts: 7
Member Since:
10/06/2009
sp_UserOfflineSmall Offline

Surely this is something that can be done. Can anyone offer me some hints?

25/07/2010
19:26
Avatar
Reg
Calgary, Canada
Member
Members
Forum Posts: 92
Member Since:
06/06/2008
sp_UserOfflineSmall Offline

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

lcActive = Iif(Active,'Yes','No')

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

25/07/2010
19:53
Avatar
Rottweiler
Member
Members
Forum Posts: 7
Member Since:
10/06/2009
sp_UserOfflineSmall Offline

Thanks, Reg.

Do I understand that all the code you're showing is running server side? So you are (simplifying) just poking an 'img' tag into the cell contents? Is that the gist?

25/07/2010
22:04
Avatar
Reg
Calgary, Canada
Member
Members
Forum Posts: 92
Member Since:
06/06/2008
sp_UserOfflineSmall Offline

Sorry, wasn't clear. Yes, this code comes from my server-side program that creates the html (or xml string) and all it really needs is to include an img tag into the returned data.

Reg

26/07/2010
08:14
Avatar
michaelg
Member
Members
Forum Posts: 51
Member Since:
10/04/2010
sp_UserOfflineSmall Offline

Hi Rottweiler,

You could also do it client-side, by using a custom validator.

Cheers,
Michael

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
49 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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information