afrausto
Posts: 66
|
| Posted: 05/17/2005, 3:39 PM |
|
Hello,
Can someone please tell me how to hide an Image Control within a grid based on a boolean field.
For example, I have a field called Image_Logo (text) and ImageLogoActive (boolean) in a grid. I only want the Image Control for Image_Logo to appear if ImageLogoActive is TRUE.
I tried using the follow code in the BeforeShowEvent for the Image Control "Image_Logo":
If NOT members.ImageLogoActive.value Then
members.Image_Logo.visible = FALSE
End If
But, this gives me the following error message:
Object doesn't support this property or method: 'members.ImageLogoActive'
Anyone have any suggestions or ideas.
Thanks,
Albert
|
 |
 |
peterr
Posts: 5971
|
| Posted: 05/17/2005, 4:16 PM |
|
Please try that code in the Before Show Row event of the grid. All controls should be accessible there.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
afrausto
Posts: 66
|
| Posted: 05/17/2005, 5:10 PM |
|
I tried what you suggested but I'm still getting the same error message:
Object doesn't support this property or method: 'members.ImageLogoActive'
Any other suggestions?
|
 |
 |
dhodgdon
Posts: 80
|
| Posted: 05/18/2005, 2:32 AM |
|
Did you try testing members.ImageLogoActive explicitly for true or false?
eg.
If members.ImageLogoActive.value <> True Then
members.Image_Logo.visible = FALSE
End If
_________________
Regards,
David Hodgdon
|
 |
 |
AQUANANU
Posts: 107
|
| Posted: 05/18/2005, 4:30 AM |
|
The image needs to be in "Extended HTML", to do this:
In addition to the code you need to do this
Right Click on the image, then choose EDIT LINK LAYOUT, finally check the box labled EXTENDED HTML
it will start working
_________________
Navneet Kakkar
CEO
Positive Thinker's Inc. |
 |
 |
afrausto
Posts: 66
|
| Posted: 05/18/2005, 9:20 AM |
|
David and Navneet,
Thanks for the suggestions. I tried both and neither worked for me. I keep getting the same error message:
Object doesn't support this property or method: 'members.ImageLogoActive'
To be sure it wasn't the field ImageLogoActive I added a Label of Data Type 'Boolean' to the grid and it printed the value(s) correctly.
You would think this would be a simple procedure to accomplish, but for some reason it's not cooperating. 
Thanks for all your help so far everyone.
Albert
|
 |
 |
dsafar
|
| Posted: 05/18/2005, 5:41 PM |
|
Is ImageLogoActive a control in the grid (ie. hidden). If not, add it.
"afrausto" <afrausto@forum.codecharge> wrote in message
news:6428b6b3f7ef1e@news.codecharge.com...
> David and Navneet,
>
> Thanks for the suggestions. I tried both and neither worked for me. I
> keep
> getting the same error message:
>
> Object doesn't support this property or method: 'members.ImageLogoActive'
>
> To be sure it wasn't the field ImageLogoActive I added a Label of Data
> Type
> 'Boolean' to the grid and it printed the value(s) correctly.
>
> You would think this would be a simple procedure to accomplish, but for
> some
> reason it's not cooperating. 
>
> Thanks for all your help so far everyone.
>
> Albert
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
afrausto
Posts: 66
|
| Posted: 05/19/2005, 8:00 AM |
|
dsafar,
Thanks for the suggestion, because it WORKED!! 
I thought as long as my sql statement selected all values within a table that they would all be available to the grid, but as I learned that is not true. They need to be added as a control within the grid in order to call them within events.
Thanks again everyone for your support.
Albert
|
 |
 |