in
Forums
Blogs
DevExpress.com
Client Center
Support Center
DevExpress Channel

ASPxMenu and Panels

Last post 9/11/2008 8:46 AM by Vic S (Developer Express). 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 9/6/2008 5:54 PM

    ASPxMenu and Panels

    I have a couple of questions, in teh ASPxMenu item, how do I disable the top level items from being clickable? I just want to do stuff when the children are clicked.

    Also, can some guide me how to accomplish this:

    I have a ASPxMenu item and based on the item that i have clicked, I want to display different tasks in a panel below without a page refresh. So basically, there should be a panel below that appears only on click of an item. And each item corresponds to different things that would be shown on the panel.

    I believe there should be a CallbackPanel somwhere, but I couldnt figure out how to get it to work.

    Also, can I have multiple panels and enable them, disable them as needed? How would I accomplish this? I have the following code so far:

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    <dxrp:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server" Width="100%"

     

     

    ShowHeader

    ="False">

     

     

    <PanelCollection

    >

     

     

    <dxp:PanelContent runat

    ="server">

     

     

    <dxcp:ASPxCallbackPanel ID="ASPxCallbackPanel1" runat="server" Width

    ="200px">

     

     

    <PanelCollection

    >

     

     

    <dxp:PanelContent ID="AddUser" runat

    ="server">

     

     

     

    <dxe:ASPxLabel ID="ASPxLabel1" runat="server" Text

    ="Users">

     

     

    </dxe:ASPxLabel

    >

     

     

    </dxp:PanelContent

    >

     

     

    </PanelCollection

    >

     

     

    </dxcp:ASPxCallbackPanel

    >

     

     

    </dxp:PanelContent

    >

     

     

    </PanelCollection

    >

     

     

    </dxrp:ASPxRoundPanel

    >

  • 9/10/2008 6:17 AM In reply to

    Re: ASPxMenu and Panels

    Hi,

    First you need to set the property of the ASPxMenu-> AllowSelectItem = True

    and place a ASPxCallBackPanel and give it a clientinstance name for example cpanel then place all the round panels you want to put inside this callback panel and make their visible property = false

    then in the ASPxMenu Event of Item Click place this line 

    //This line call the cpanel call back and pass to it a parameter the text of the clicked item

    cpanel.PerformCallback(s.GetSelectedItem().GetText());

    Then in the event of the  Callback of the Panel

      Protected Sub ASPxCallbackPanel1_Callback(ByVal source As Object, ByVal e As DevExpress.Web.ASPxClasses.CallbackEventArgsBase) Handles ASPxCallbackPanel1.Callback

    if(e.Parameter = "SOANDSO") Then

    display  rount panel 1 // set visible for round panel1 to true

    Else if (e.Parameter = "SoANdSo2") Then

    display round panel 2 // set visible for round panel2 to true

    End If

        End Sub

     

    Regards

    Ramy Mostafa

    Ramy Mostafa
    http://www.ramymostafa.com
    Senior Developer
    Code Republic Co.
  • 9/10/2008 12:55 PM In reply to

    Re: ASPxMenu and Panels

     How do you disable the Menu root level items from being clickable?

  • 9/11/2008 3:54 AM In reply to

    Re: ASPxMenu and Panels

    Hi,

    In the client side event ItemClick put the following condition

    //if its an empty string this means its a root element

    if(s.GetSelectedItem().parent.GetText() != "")

    {

    cpanel.PerformCallback(s.GetSelectedItem().GetText());

    }

    Regards

    Ramy Mostafa

    Ramy Mostafa
    http://www.ramymostafa.com
    Senior Developer
    Code Republic Co.
  • 9/11/2008 8:46 AM In reply to

    Re: ASPxMenu and Panels

    Hello!
    You can take a look at the following thread to find some sample code:

    http://community.devexpress.com/forums/p/60542/204939.aspx#204939

    Thanks,
    Vic

    R&D, Developer Express Inc.
Page 1 of 1 (5 items)
Copyright © 1998-2009 Developer Express Inc.
ALL RIGHTS RESERVED