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

XML File Flashes on screen when loading Menu

4 Answers 57 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Russ
Top achievements
Rank 1
Russ asked on 03 Feb 2012, 05:53 PM

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

4 Answers, 1 is accepted

Sort by
0
Russ
Top achievements
Rank 1
answered on 07 Feb 2012, 10:36 PM
Nobody?
0
Kate
Telerik team
answered on 08 Feb 2012, 03:17 PM
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 >>
0
Russ
Top achievements
Rank 1
answered on 09 Feb 2012, 08:46 PM
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

0
Kate
Telerik team
answered on 15 Feb 2012, 02:14 PM
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 >>
Tags
Menu
Asked by
Russ
Top achievements
Rank 1
Answers by
Russ
Top achievements
Rank 1
Kate
Telerik team
Share this question
or