Hi,
I am making a chat app and the DataList of messages is refreshed by a timer that is ajaxed by a RadAjaxManagerProxy
I am making a chat app and the DataList of messages is refreshed by a timer that is ajaxed by a RadAjaxManagerProxy
Problem is that because it is a proxy then all the controls on the page are being ajaxed and so the TextBox that the user types into is also refreshing.
So I need to stop the timer refreshing the TextBox somehow but then enable it when the user presses 'send' so that I can clear the TextBox. Does this make any sense?
Is this possible?
Cheers, Jon
4 Answers, 1 is accepted
0
Hello Jon,
You can use the ASP.NET AJAX timer to refresh the DataList instance only (specifying that through the RadAjaxManagerProxy settings) as illustrated on this demo with the grid:
http://demos.telerik.com/aspnet-ajax/ajax/examples/common/ajaxifytimer/defaultcs.aspx
Thus the user will not be interrupted when the timer triggers data list repaint. Then, through a different proxy setting, you can specify the 'Send' button as an initiator and the TextBox as one of the updated controls to reset it.
Kind regards,
Sebastian
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
You can use the ASP.NET AJAX timer to refresh the DataList instance only (specifying that through the RadAjaxManagerProxy settings) as illustrated on this demo with the grid:
http://demos.telerik.com/aspnet-ajax/ajax/examples/common/ajaxifytimer/defaultcs.aspx
Thus the user will not be interrupted when the timer triggers data list repaint. Then, through a different proxy setting, you can specify the 'Send' button as an initiator and the TextBox as one of the updated controls to reset it.
Kind regards,
Sebastian
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jon
Top achievements
Rank 1
answered on 03 Jul 2009, 10:17 AM
Hi Sebastion,
Thanks for the super quick reply.
This is how I thought it should work and in a stand alone aspx page it does work as it should.
However, I am loading user controls dynamically into a panel and because the default.aspx page has an AjaxProxy on it which updates the panel adding the usercontrol with ajax - then everything in all the usercontrols becomes ajaxed, regardless of having an AjaxProxy on each .ascx page.
Cheers,
Jon
Thanks for the super quick reply.
This is how I thought it should work and in a stand alone aspx page it does work as it should.
However, I am loading user controls dynamically into a panel and because the default.aspx page has an AjaxProxy on it which updates the panel adding the usercontrol with ajax - then everything in all the usercontrols becomes ajaxed, regardless of having an AjaxProxy on each .ascx page.
Cheers,
Jon
0
Hello Jon,
Then the solution would be to redefine your logic and avoid ajaxifying the entire panel which hosts the user control. Thus you should use the RadAjaxManagerProxy instances inside the dynamically loaded user control to define the ajax settings as explained in my first reply. Only this way you would be able to attain the desired result.
Best regards,
Sebastian
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Then the solution would be to redefine your logic and avoid ajaxifying the entire panel which hosts the user control. Thus you should use the RadAjaxManagerProxy instances inside the dynamically loaded user control to define the ajax settings as explained in my first reply. Only this way you would be able to attain the desired result.
Best regards,
Sebastian
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jon
Top achievements
Rank 1
answered on 03 Jul 2009, 01:05 PM
Hi Sebastion,
Many thanks for your help on this and for clearing up the issue with loading inside a panel. I'll remember that for the future!
I've decided to put the chat app inside a separate aspx page and then use an iFrame on the user control ~ It works great for this scenario.
Cheers,
Jon
Many thanks for your help on this and for clearing up the issue with loading inside a panel. I'll remember that for the future!
I've decided to put the chat app inside a separate aspx page and then use an iFrame on the user control ~ It works great for this scenario.
Cheers,
Jon