Can this be done?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm writing a web based application in C# and asp.net. I'm using the
WebControls.Table object to display data from the database. My boss wants me
to put search fields above it so that he can restrict the result size. I
accomplished this and by retrieving with a sql statement where I populate the
WHERE clause at the end I am able to give him everything that he wants.

Now he wants to be able to hide the search fields and have the table move up
on the screen. This is to be toggle-able, that is to say, click a button and
the search fields disappear and the table scoots up to take it's place. Click
the button again and the table scoots down as the search fields open.

This is to be done in a browser. Is there a way to do this/
 
yes

put your fields in a table
then do table.visible = true/false.

should be a childs work
 
BTW since the button click posts an event it will repain the page.Since your
table is not visible
(or vice versa) the whole "move" thing will take care of it self.

r
 
If you want to do it client side using javascript just wrap the thing you
want to hide in a div and you can hide or show the div by setting it's css
display property.

If you want to do it on the server just set the Visible property of the
table/panel to false to hide it.
--
Brian Delahunty
Ireland

http://briandela.com/blog

INDA SouthEast - http://southeast.developers.ie/ - The .NET usergroup I
started in the southeast of Ireland.
 
Thank you so much Raj, for you quick reply. The table works great but the
table that is below it doesn't move back up when the new table disappears.

I'm doing something silly I'm sure. It's probably as clear as diamonds but
I'm missing it.
 
You may have the web form in GridLayout with fixed positions instead of
FlowLayout which is preventing the auto-movement of the bottom table. Hope
this helps.
 
I did have it in grid to position the controls originally, but then I changed
it to flow. Is there a 'fixed' property for each of the individual controls
as well?
--
----------------------------------------
Magic is not in the hands of the magician but in the mind of the audience.

Animadverto est verus
 
Back
Top