control won't "hide"

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
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.
 
Back
Top