PDA

View Full Version : [CLOSED] Refreshing A Particular Div With TaskManager - It Currently loads the whole page.



WHISHWORKS
Dec 27, 2012, 11:52 AM
Hello,
My issue is that when i add a TaskManager in my usercontrol and start the task at the runtime (during the page load), the whole page containing the user control is post-back ! I want just a particular 'div' to be refreshed the AJAX way ! I do have an event '' defined at within the 'DirectEvents' which i wish to trigger when the specified interval for the TaskManager is lapsed. What might be goin' wrong here ?

Following is my ascx page with the TaskManager:

<ext:TaskManager ID="TManager" runat="server">
<Tasks>
<ext:Task TaskID="servertime" >
<DirectEvents>
<Update OnEvent="TManager_Tick">
</Update>
</DirectEvents>
</ext:Task>
</Tasks>
</ext:TaskManager>

<div id="mainDiv" runat="server" style="background-color:White; width:100%;" >
<ext:Label runat="server" ID="lblDisplayMe" Visible="true" ></ext:Label>
</div>

The task is started during the control load in ascx.cs:

TManager.StartTask(0);
TManager.Tasks[0].Interval = 5000;
TManager.Tasks[0].AutoRun = true;

Whenever the 'TManager_Tick' event is fired, I wish to load the 'mainDiv' only. Currently it refreshes the whole page.
Please help.

Thanks,
Whishworks

Daniil
Dec 27, 2012, 2:15 PM
Hi @WHISHWORKS,

Please look at this example.
http://examples2.ext.net/#/TaskManager/Basic/Overview/

It appears to be working as you need.

Also you probably need to use the Hidden property instead of the Visible one. Here are more details.
http://forums.ext.net/showthread.php?13114&p=54033&viewfull=1#post54033

WHISHWORKS
Jan 04, 2013, 9:52 AM
Hi @WHISHWORKS,

Please at this example.
http://examples2.ext.net/#/TaskManager/Basic/Overview/

It appears to be working as you need.

Also you probably need to use the Hidden property instead of the Visible one. Here are more details.
http://forums.ext.net/showthread.php?13114&p=54033&viewfull=1#post54033

Hello Daniil,
We have gone through the example on the TaskManager and are trying to fire a server-side event with the help of the TaskManager ditto as per the example. Only in our case, we have a user control which contains multiple divs (no ViewPort or Panels as in the example.).

Once the TaskManager starts ticking, the title-bar of the browser repeatedly keeps flickering and showing the loading status which should not be the case. Please refer to the code that i had provided earlier and do let me know if there's any issue in that.

Thanks,
Whishworks

Daniil
Jan 04, 2013, 11:18 AM
Where do you call this code?

TManager.StartTask(0);

TManager.Tasks[0].Interval = 5000;

TManager.Tasks[0].AutoRun = true;




If during initial load (for example, the OnLoad event) you should not call the StartTask method.

If during a DirectEvent, setting up the Interval and Autorun properties doesn't affect on a client side.

A full example to reproduce the problem would be appreciated.