Progress bar progressing/Message while Loading of Datagrid

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Blacky
    New Member
    • Jan 2009
    • 40

    Progress bar progressing/Message while Loading of Datagrid

    HI,

    I need to show a progress bar/message till the datagrid is fully loaded and shown in the screen.Currentl y, i have witten a javascript with time specified and shows a message 'Please wait while the data is loading".

    I need to capture the time taken for grid to load data and pass that time to the javascript.

    Is there any soluntions for this..??

    The javascript i call in body onload is,
    Code:
       function Show()
        {  
           document.getElementById('dvStatus').style.display = '';
           var t = setTimeout("document.getElementById('dvStatus').style.display = 'none';",[B]500000[/B]);    
           document.getElementById('imStatus').src = 'Images/Preloader_2.gif';
          
        }
    
    
    
      <div id="dvStatus" runat="server" visible="false" style="left: 380px; position: absolute; bottom: 90px; background-color: White">
                <img src="Images/Preloader_2.gif" alt="Progress" id="imStatus" />
                <asp:Label ID="lblStatus" runat="server" CssClass="messageStyle"></asp:Label>
            </div>

    Thanks in advance,
    Blacky
    Last edited by Frinavale; Apr 9 '09, 05:57 PM. Reason: Added code tags. Please post code in [code] [/code] tags.
  • maliksleo
    New Member
    • Feb 2009
    • 115

    #2
    i think this functionality is already given in progress bar tool by microsoft.

    you only have to put your datagrid inside the updatepanel and associate the progressbar and updatepanel and you will get the results what you want.

    maliksleo

    Comment

    • Blacky
      New Member
      • Jan 2009
      • 40

      #3
      I am not using ajax.Kindly let me know other solution

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        Well, the problem with your solution is that your JavaScript function is called when the page is loaded. This means that the data is already loaded which is not really when you want to call it.

        What I would recommend is placing your data in a Panel (or <div>) that has a display style of "display:no ne". Your content will not show up on the page now.

        Set the style for your "dvStatus" <div> to "display:block" .

        Change your JavaScript to hide the "dvStatus" <div> and display the <div> containing the content during the <body>'s JavaScript onload event.

        -Frinny

        Comment

        Working...