Not able to Rebind the RadMenu

5 posts, 0 answers
  1. Medac
    Medac avatar
    79 posts
    Member since:
    Sep 2008

    Posted 18 Jun 2010 Link to this post

    Hi,

    I have one xml file where i have defined URL as one attribute in all xml node. Based on some condition i need to set this URL value. So i cannot assign values to static xml. To achieve this functionality in code behind file I have implemented as below. But it is not fetching the newly set URL value.

    Can anybody help me in re bind the xml data source to radmenu item?

    'Get the list of name nodes
                xmlnodelst = xmlFinalDoc.SelectNodes("Items/Item/Item")

                For Each xmlParentNode In xmlnodelst
                    For Each xmlnode In xmlParentNode.ChildNodes
                        If CDbl(xmlnode.Attributes.GetNamedItem("Value").Value) = 42 Or CDbl(xmlnode.Attributes.GetNamedItem("Value").Value) = 41 Then

                            If CBool(objBOApplication.Group.UsePaymentBatchDetails) Then
                                If CDbl(xmlnode.Attributes.GetNamedItem("Value").Value) = 41 Then
                                    xmlnode.Attributes.GetNamedItem("Url").Value = "../Pages/PaymentBatchCreate.aspx?payMode=O"
                                Else
                                    xmlnode.Attributes.GetNamedItem("Url").Value = "../Pages/PaymentBatchCreate.aspx?payMode=E"
                                End If
                            Else
                                If CDbl(xmlnode.Attributes.GetNamedItem("Value").Value) = 41 Then
                                    xmlnode.Attributes.GetNamedItem("Url").Value = "../Pages/PayBatch.aspx?payMode=O"
                                Else
                                    xmlnode.Attributes.GetNamedItem("Url").Value = "../Pages/PayBatch.aspx?payMode=E"
                                End If
                            End If
                        End If
                    Next
                Next

                xmlDataSrc.Dispose()
                xmlDataSrc.Data = xmlFinalDoc.OuterXml
                xmlDataSrc.XPath = PresentationConstants.XPATH
                xmlDataSrc.DataBind()

                mnuKAM.Items.Clear()
                mnuKAM.DataSource = xmlDataSrc
                mnuKAM.DataNavigateUrlField = PresentationConstants.URL
                mnuKAM.DataTextField = PresentationConstants.TEXT
                mnuKAM.DataValueField = PresentationConstants.Value

                radMnuBindg.ImageUrlField = PresentationConstants.IMAGE
                radMnuBindg.NavigateUrlField = PresentationConstants.URL
                radMnuBindg.TextField = PresentationConstants.TEXT
                radMnuBindg.ValueField = PresentationConstants.Value

                mnuKAM.DataBindings.Add(radMnuBindg)
                mnuKAM.DataBind()


  2. Yana
    Admin
    Yana avatar
    5013 posts

    Posted 23 Jun 2010 Link to this post

    Hi Medac,

    I'm not sure I understand your requirement, could you please explain in more details? Thanks

    Regards,
    Yana
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Medac
    Medac avatar
    79 posts
    Member since:
    Sep 2008

    Posted 24 Jun 2010 Link to this post

    Hi ,

    We have a xml file which will be used as datasource for the menu.Xml file will be static and it will not be changed.

    Based on the security permission we need to hide and display certain menu item and also have to provide different URL for the same menu item.

    When we login to the application we bind the menu with the static xml file.
    Once we login again based on the Group selected by the user menu items must be changed.

    To achieve this, we get Static xml and based on conditions we will alter the items in xml.

    Resultant xml will be bound to the radmenu.

    But the changes are not reflected in Radmenu .It is displaying the menu items which is bounded while Login.

    The changes wlll be reflected only when application is rebuild and run.

    Let us know ,If you still need explanation on this.

  4. Medac
    Medac avatar
    79 posts
    Member since:
    Sep 2008

    Posted 25 Jun 2010 Link to this post

    Hi,


    Can any one give a solution to this.

    On databind menu items are not updated for the second time.

    Is there any issue with menu.

    Please reply as soon as possible.... Urgent!!!!!!!!!!!

  5. Yana
    Admin
    Yana avatar
    5013 posts

    Posted 29 Jun 2010 Link to this post

    Hello Medac,

    I've tested this in a simpler scenario but couldn't reproduce the described issue. Could you please try to isolate it and send us the code? Thanks

    Regards,
    Yana
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top