control won't "hide"

G

Guest

I have a page where I have 3 combo boxes listed in a column. sort of like:

combo1
combo2
combo3

Based on which one is clicked, the others are supposed to hide (i.e.
combobox.visible = false).

However, when I have the bottom one in that column to be the one to be used
(selectedindex > 0) even if I set the visible property to be false, the
combo box will show. In this case, I'm trying to hide combo2 from view,
after selecting an item from combo3.

It doesn't show the data in it, it's just an empty combo box that's in the
middle.

The onclick of the controls displays a datagrid, and I have the following in
the bindgrid sub just to confirm:

dim q as boolean
q = cmbbox.visible and it returns false, yet the empty combobox still shows.

Can you hide the combo boxes like this?

I believe the combo boxes are unhidden at page load, but do not know if I
need to hide them at first, and then unhide them as I display stuff in them.
However, this "hide" of the middle box is based on a selectedindexchanged
event on the bottom combo box.

Any help appreciated.

SC
 
G

Guest

Never mind -

I found the problem.

There was a control exactly behind the one I could not apparently get to
hide. It had to get there by mistake.


SC
 
G

Guest

Thanks for the response.

I was doing exactly what you had suggested, and couldn't get the mystery box
to hide. I had to move stuff around on the page, and it was at that point
that I found a control hiding behind the other one.

Sometimes I am my own worst enemy.

SC


Bin Song said:
There are 2 ways to do this.
1. Using server side that you are doing now. However, the combo2 will only
hide after a postback, which you can achieve by set autopostback of combo3
to true.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top