This is a migrated thread and some comments may be shown as answers.

expand panel with javascript

2 Answers 75 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
appdev
Top achievements
Rank 1
appdev asked on 26 Sep 2008, 04:08 PM
hi guys
panelbar
    item
        panelitem
            item
                panleitem
                    itemtemplate
         panelitem
            item
                panleitem
                    itemtemplate

so my panel bar has 2 items now and inside these items are aspx controls like dropdown list and next button. lets say i am in the first panel item, and now want to click the next button, this next button will take me to the second panel item. so it will collapse the first panel item and expand the second one. how do i do this in javascript so that i don't have to do the postback. thank you very much.

2 Answers, 1 is accepted

Sort by
0
Serrin
Top achievements
Rank 1
answered on 26 Sep 2008, 07:46 PM
Hey again Duy!

Check out this online demo, it shows client-side expanding and collapsing of a RadPanelBar with javascript. :)

RadPanelBar Client-Side API

You can scroll through the ASPX and just grab the javascript functions right out of there. :)
0
appdev
Top achievements
Rank 1
answered on 26 Sep 2008, 08:05 PM
thank you serrin. let me ask you something else. everytime when you assign value to a control inside the itemtemplate, you have to declare a new controls. so how can you retrieve it from another function or sub on the same page. let say
first you load the page with page_load sub right. and inside that sub there's a dim newdropdown as dropdownlist right. now they click submit

so i have a button_click sub in that same page so how do i retrieve that dropdown value without having to declare it as public variable and put it in to cookies or session variable is there anything as easy as me.dropdownlist1.selected.........

thank you very much serrin.
Tags
PanelBar
Asked by
appdev
Top achievements
Rank 1
Answers by
Serrin
Top achievements
Rank 1
appdev
Top achievements
Rank 1
Share this question
or