Completed
Last Updated: 28 Jul 2016 12:24 by ADMIN
ADMIN
Marin Bratanov
Created on: 02 Jun 2014 13:26
Category: TileList
Type: Feature Request
1
IMPROVE RadLiveTile should not invoke a request if set_updateInterval(0) is called
In some cases, according to a condition, after the data from a request arrives, the developer may want to prevent further requests from this same tile. This should be possible by setting the update interval to 0.

In the meantime, you can add dynamically (and remove when needed) a handler for the OnClientDataLoading event that will cancel the event and thus - the request. For example:
			<telerik:RadLiveTile ID="MyLivetile" UpdateInterval="1000" OnClientTemplateDataBound="MyLivetile_OnClientTemplateDataBound"
								 runat="server">
				<WebServiceSettings Path="Default.aspx" Method="MyPagemethod" UseHttpGet="false" />
				<ClientTemplate>
					some template that uses the data
				</ClientTemplate>
			</telerik:RadLiveTile>
			<script type="text/javascript">
				function MyLivetile_OnClientTemplateDataBound(sender, args) {
					var completed = args.get_dataItem().Completion;
					if (completed) {
						sender.add_dataLoading(preventLiveTileRequests);
					}
				}
				
				function preventLiveTileRequests(sender, args) {
					args.set_cancel(true);
				}
			</script>
1 comment
ADMIN
Rumen
Posted on: 28 Jul 2016 12:24
Due to lack of enough demand, I've marked this feature request as completed since it includes a solution. If more users submit their votes, we could consider implementing it built-in.