Results 1 to 3 of 3

Thread: AJAX Collapse All/Expand All

Hybrid View

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Mar 2004
    Location
    Orlando, FL
    Posts
    1,618

    AJAX Collapse All/Expand All

    Any thoughts on how to do this? Make all of them on a page collapse or expand. Seems like it shouldn't be terribly hard.
    Sean

    Some days when I think about the next 30 years or so of my life I am going to spend writing code, I happily contemplate stepping off a curb in front of a fast moving bus.

  2. #2
    Frenzied Member
    Join Date
    Jan 2006
    Posts
    1,875

    Re: AJAX Collapse All/Expand All

    assuming your CollapsiblePanelExtender are inside Form tag having id form1, this should work:
    1.Collapse All
    Code:
             Dim ccpe = From n In form1.Controls Where n.GetType().ToString = "AjaxControlToolkit.CollapsiblePanelExtender" Select n
            'Collapse
            For Each ctl In ccpe
                ctl.Collapsed = True
                ctl.ClientState = True
            Next
    2.Expand All
    Code:
             Dim ccpe = From n In form1.Controls Where n.GetType().ToString = "AjaxControlToolkit.CollapsiblePanelExtender" Select n
            'Collapse
            For Each ctl In ccpe
                ctl.Collapsed = False
                ctl.ClientState = False
            Next
    __________________
    Rate the posts that helped you

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Mar 2004
    Location
    Orlando, FL
    Posts
    1,618

    Re: AJAX Collapse All/Expand All

    Thanks!
    Sean

    Some days when I think about the next 30 years or so of my life I am going to spend writing code, I happily contemplate stepping off a curb in front of a fast moving bus.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width