asp.net - combo box ajaxcontrol -


i have filter panel 5-6 combo boxes ajax control tool kit..

i want filter panel visible false default.. , toggle it(show/hide) on client click using java script

however when have filter panel visible = false runat=server java script not object

and if code behind.. filterpanel.attributes.add("style",display:none) filterpanel.attributes.add("style",visibilty:hidden)

the combo box throws runtime error..

i've searched on net says.. combo box difficult render inside panel.. default property false!

the problem <select> elements have rendered (but not visible) in order reliably access dimension properties.

so display: none; won't work because elements not rendered, , visibility: hidden; partially work because elements rendered, space allocated them on page, hidden, space remain empty.

a third solution render container usual, make absolutely positioned outside of browser viewport:

filterpanel.attributes.add("style",     "position: fixed; left: -10000px; top: -10000px;"); 

that way, panel , contents won't visible, size of <select> elements computed.

on client side, formula show panel becomes:

document.getelementbyid("filterpanelclientid").style.position = "static"; 

and hide again:

document.getelementbyid("filterpanelclientid").style.position = "fixed"; 

you can test jquery-based implementation here.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -