Call of progress bar on selected events

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • maliksleo
    New Member
    • Feb 2009
    • 115

    Call of progress bar on selected events

    hi

    I have an update panel having linkbuttons, dropdowns, buttons, gridview etc.

    And i have a progress bar having <DIV>.

    on every event that <div> is shown,

    But

    I want that it only shows when linkbutton is clicked.

    And my linkbutton is situated inside the gridview.

    thanks in advance
    maliksleo
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Instead of using a progress bar use JavaScript to display the <div> when the LinkButton is clicked (set the client onclick = A JavaScript function that displays the <div>

    You can do this using animations if you want to.

    Comment

    • maliksleo
      New Member
      • Feb 2009
      • 115

      #3
      Originally posted by Frinavale
      You can do this using animations if you want to.
      how i can do this though animation?

      but i want to do this with the progress bar please tell me any solution if any

      maliksleo

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        When you use an UpdateProgress control, it will appear every time the UpdatePanel it's associated with is involved with an Ajax Call the server.

        If you don't want it to appear every time then you should not use the UpdateProgress control.

        At the time that I answered your question I thought the UpdateProgress control was part of the Ajax Control Toolkit. Are you using the Ajax Control Toolkit in your application? Animations are not available without this toolkit....


        If you're not using the Ajax Control Toolkit consider implementing JavaScript function to handle the PageRequstManag er's BeginRequest and EndRequest events (info on the BeginRequest Event can be found here and info on the EndRequest Event can be found here.


        You would have 2 JavaScript functions that handle these events:
        Code:
        function BeginRequestHandler(){
           'code that displays the <div> during updating
        }
        function EndRequestHandler(){
          'code that hides the <div> when not updating.
        }
        The PageRequestMana ger has a Singleton pattern. You get a reference to the PageRequestMana ger using the getInstance() method. Once you have this reference you can tell it to execute the JavaScript methods when the request begins and ends:

        Code:
        Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequestHandler);               Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
        -Frinny

        Comment

        • maliksleo
          New Member
          • Feb 2009
          • 115

          #5
          Originally posted by Frinavale
          Are you using the Ajax Control Toolkit in your application? Animations are not available without this toolkit....-Frinny
          Yes i am using AJAX control toolkit and how i can use the animation for this?
          And thanks for your help Frinny

          maliksleo

          Comment

          • Frinavale
            Recognized Expert Expert
            • Oct 2006
            • 9749

            #6
            Write the animation for an UpdatePanelAnim ation extender.

            When implementing your Animation, use the ScriptAction to specify when to run the animation.

            -Frinny

            Comment

            • maliksleo
              New Member
              • Feb 2009
              • 115

              #7
              Thanks Frinny for your kind help but in case of updatepanel animation i am unable to use the onupdating tag inside the animation tag can you help me in this by providing some sort of sample code.
              As i saw on asp.net site the onupdating tag is mentioned but when i actually applied to my page i am getting compilation error on it.
              Waiting for your reply

              maliksleo

              Comment

              • Frinavale
                Recognized Expert Expert
                • Oct 2006
                • 9749

                #8
                Please post the compilation error that you're getting.

                Comment

                • maliksleo
                  New Member
                  • Feb 2009
                  • 115

                  #9
                  Originally posted by Frinavale
                  Please post the compilation error that you're getting.
                  I dont know what it is? last day before posting to this thread i was getting copmilation error on <onupdating> tag but, today i am not getting this error instead my page is working quite well i dont know how?

                  any how thanks for your help Frinny

                  just tell me one more thing in this that how i can use this animation on only one control say gridview in the updatepanel as i am not getting any auto complete help in side the animation and onupdation tags even though i pressed ctrl + space.

                  Code:
                   <OnUpdating>
                                 <Fadein Duration="1.0" Fps="3" />
                            </OnUpdating>
                  i am using this examplary code instead i want to use like this

                  Code:
                   <OnUpdating>
                                 "Fadein my gridview"
                            </OnUpdating>
                  how i can do this?

                  maliksleo

                  Comment

                  • Frinavale
                    Recognized Expert Expert
                    • Oct 2006
                    • 9749

                    #10
                    Hmmm.

                    Well without trying to figure out how to do this using JavaScript...co nsider placing your GridView into it's own UpdatePanel and setting an animation for that UpdatePanel.

                    Comment

                    Working...