XML File Flashes on screen when loading Menu

5 posts, 0 answers
  1. Russ
    Russ avatar
    4 posts
    Member since:
    Jan 2012

    Posted 03 Feb 2012 Link to this post


    I'm loading the ASP.NET RadMenu from a static XML file on Page_Load event like so.

    if (!IsPostBack)  {
        RadMenu1.LoadContentFile("~/Menu/MainMenu.xml"); }

    I frequently can see a flash of the entire XML file (50+ items in it) while the page is loading. 

    Are there any stratgies to avoid this problem?

    Thanks,
    Russ
  2. Russ
    Russ avatar
    4 posts
    Member since:
    Jan 2012

    Posted 07 Feb 2012 Link to this post

    Nobody?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 08 Feb 2012 Link to this post

    Hi Russ,

    Can you clarify what exactly you mean by saying I frequently can see a flash of the entire XML file - is it that the RadMenu itself flashes or the xml file? Assuming it is the menu control you can try using the following code that initially hides the menu and when the page loads the menu's visibility is restored:
    <script type="text/javascript">
            function OnClientLoad(sender, args) {
                setTimeout(function () { sender.get_element().style.visibility = "visible"; }, 1);
            }
        </script>
     
        <telerik:RadMenu ID="RadMenu1" runat="server" OnClientLoad="OnClientLoad" Style="visibility:hidden">
        </telerik:RadMenu>

    Kind regards,
    Kate
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  5. Russ
    Russ avatar
    4 posts
    Member since:
    Jan 2012

    Posted 09 Feb 2012 Link to this post

    See attachment for what I see for a split second when I'm loading pages.  We are talking a 1/4 second or so.  I was able to get a screen shot after several attempts.  I don't see the raw XML, but formatted data that is to be loaded in the menu.

    I will attempt your fix and let you know how it goes.
    Thx.
    Russ

  6. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 15 Feb 2012 Link to this post

    Hello Russ,

    Take you time for testing. If you still encounter the issue (after trying the suggested approach), however,  I would suggest that you open a support ticket and attach a simplified runnable project that we could test locally and help you out. 

    Greetings,
    Kate
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017