CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 How To Hide an Image in Grid

Print topic Send  topic

Author Message
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
View profile  Send private message
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
View profile  Send private message
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?
View profile  Send private message
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
View profile  Send private message
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.
View profile  Send private message
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
View profile  Send private message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.