stanchat
Posts: 7
|
| Posted: 04/19/2005, 10:56 AM |
|
Is there a way to dynamically change the image that is displayed on a grid using the imagelink.
Currently my imagelink is databound to a field in the table called imagename. If this field has a value all is good and the image is displayed. However if this field is NULL only the red X is displayed. I would like to have it work so that I check to see if the value is NULL if it is, then I would like to display a my NO_IMAGE_AVAILABLE.jpg instead.
|
 |
 |
DonB
|
| Posted: 04/19/2005, 1:15 PM |
|
I'd implement the query with an ifNull() function to substitute the
appropriate image for any NULL values.
Other than that, you can change the Value of the ImageLink in its Before
Show event so that it's the alternate image when a NULL is found.
If you turn on the Enhanced HTML for the ImageLink, then you can even set
its Visible property to false and not display it at all.
--
DonB
http://www.gotodon.com/ccbth
"stanchat" <stanchat@forum.codecharge> wrote in message
news:64265465aa603f@news.codecharge.com...
> Is there a way to dynamically change the image that is displayed on a grid
using
> the imagelink.
>
> Currently my imagelink is databound to a field in the table called
imagename.
> If this field has a value all is good and the image is displayed. However
if
> this field is NULL only the red X is displayed. I would like to
have
> it work so that I check to see if the value is NULL if it is, then
I
> would like to display a my NO_IMAGE_AVAILABLE.jpg instead.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
stan
|
| Posted: 04/19/2005, 5:59 PM |
|
Thanks it works now. This is the code I usedif (Products.ImageLocation.value ="") then
Products.ImageLocation.value = "../images/no_image.jpg"
end if
|
|
|
 |
|