Connecting Tech Pros Worldwide Forums | Help | Site Map

Call of progress bar on selected events

maliksleo's Avatar
Member
 
Join Date: Feb 2009
Location: Islamabad, Pakistan
Posts: 115
#1: Apr 17 '09
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's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,137
#2: Apr 17 '09

re: Call of progress bar on selected events


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.
maliksleo's Avatar
Member
 
Join Date: Feb 2009
Location: Islamabad, Pakistan
Posts: 115
#3: Apr 18 '09

re: Call of progress bar on selected events


Quote:

Originally Posted by Frinavale View Post

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
Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,137
#4: Apr 20 '09

re: Call of progress bar on selected events


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 PageRequstManager'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:
Expand|Select|Wrap|Line Numbers
  1. function BeginRequestHandler(){
  2.    'code that displays the <div> during updating
  3. }
  4. function EndRequestHandler(){
  5.   'code that hides the <div> when not updating.
  6. }
The PageRequestManager has a Singleton pattern. You get a reference to the PageRequestManager using the getInstance() method. Once you have this reference you can tell it to execute the JavaScript methods when the request begins and ends:

Expand|Select|Wrap|Line Numbers
  1. Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequestHandler);               Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
-Frinny
maliksleo's Avatar
Member
 
Join Date: Feb 2009
Location: Islamabad, Pakistan
Posts: 115
#5: Apr 21 '09

re: Call of progress bar on selected events


Quote:

Originally Posted by Frinavale View Post

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
Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,137
#6: Apr 21 '09

re: Call of progress bar on selected events


Write the animation for an UpdatePanelAnimation extender.

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

-Frinny
maliksleo's Avatar
Member
 
Join Date: Feb 2009
Location: Islamabad, Pakistan
Posts: 115
#7: Apr 22 '09

re: Call of progress bar on selected events


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
Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,137
#8: Apr 22 '09

re: Call of progress bar on selected events


Please post the compilation error that you're getting.
maliksleo's Avatar
Member
 
Join Date: Feb 2009
Location: Islamabad, Pakistan
Posts: 115
#9: Apr 23 '09

re: Call of progress bar on selected events


Quote:

Originally Posted by Frinavale View Post

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.

Expand|Select|Wrap|Line Numbers
  1.  <OnUpdating>
  2.                <Fadein Duration="1.0" Fps="3" />
  3.           </OnUpdating>
i am using this examplary code instead i want to use like this

Expand|Select|Wrap|Line Numbers
  1.  <OnUpdating>
  2.                "Fadein my gridview"
  3.           </OnUpdating>
how i can do this?

maliksleo
Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,137
#10: Apr 23 '09

re: Call of progress bar on selected events


Hmmm.

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


Similar ASP.NET bytes