This is a migrated thread and some comments may be shown as answers.

RadLive Tile Sharepoint

1 Answer 42 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
Reeba
Top achievements
Rank 1
Reeba asked on 05 Dec 2014, 02:01 PM
Hi Telerik Team,

Do you have any examples you can provide where a "Radlive" Tile is used in a visual webpart for SharePoint 2010.

I tried the using the demo examples that were provided in the links below but that does not work for me . The radlive tile does not get populated.

http://demos.telerik.com/aspnet-ajax/tilelist/examples/livetiles/defaultcs.aspx
http://www.telerik.com/help/aspnet-ajax/tilelist-tiles-livetile-loading-data.html
http://blogs.msmvps.com/windsor/2011/11/04/walkthrough-creating-a-custom-asp-net-asmx-web-service-in-sharepoint-2010/

I have tried both page methods and webservices. Neither has worked for me. Any help at this point would be greatly appreciated.



Here is the markup and server side code:

 

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="TileMe.aspx.vb" Inherits="Starter.TileMe" %>

 

<!DOCTYPE html>

 

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

   
<title></title>

   
<link href="styles.css" rel="stylesheet" type="text/css" />

 

   
<script type="text/javascript">

 

       
//The dataLoadingError client side event
occurs after the data request returns an error.

 

       
function
tileDataLoadingError(sender, args) {

 

           
var data =
args.set_cancelErrorAlert(true);

 

       
}

 

       
//The dataLoaded client side event occurs
after the data request returns the data successfully.

 

       
function
tileDataLoaded(sender, args) {

 

           
var data =
args.get_data();

           
//format the received date property

 

       
}

 

       
//The templateDataBound client-side event
occurs after the client template is data bound.

 

       
function
tileClientTemplateDataBound(sender, args) {

 

       
}

 

   
</script>

</head>

<body>

   
<form id="form1" runat="server">

   
<div>

       
<telerik:RadScriptManager ID="rsmTileMe" runat="server" EnablePageMethods="true" />

 

       
<telerik:RadLiveTile ID="rltTileMe" runat="server" UpdateInterval="6000" Value="TILEME" Shape="Wide" />

   
</div>

   
</form>

</body>

</html>

 

Imports Telerik.Web.UI

Imports System.Runtime.Serialization

'Imports
System.ServiceModel

 

Public Class TileMe

   
Inherits
System.Web.UI.Page

 

   
<DataContract> _

   
Public Class TileMeSilly

       
<DataMember>
_

       
Public ReadOnly Property CurrentDateTime As String

           
Get

               
Return
Now.ToString

           
End Get

       
End Property

 

       
<DataMember>
_

       
Public ReadOnly Property TomorrowDateTime As String

           
Get

               
Return
Now.AddDays(1).ToString

           
End Get

       
End Property

   
End Class

 

   
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

       
InitTileMe(rltTileMe)

   
End Sub

 

   
Protected Sub InitTileMe(ByVal tile As RadLiveTile)

       
tile.Target = "_blank"

       
tile.ClientTemplate = "<div
class=""tileClientTemplate"">" & _

               
"<div><strong>Current:</strong>
#= CurrentDateTime #</div>" & _

               
"<div><strong>Tomorrow:</strong>
#= TomorrowDateTime #</div>" & _

              
"</div>"

 

       
tile.WebServiceSettings.Path = "TileMe.aspx"

       
tile.WebServiceSettings.Method = "TileMeMeth"

 

       
tile.OnClientDataLoaded = "tileDataLoaded"

       
tile.OnClientDataLoadingError = "tileDataLoadingError"

       
tile.OnClientTemplateDataBound = "tileClientTemplateDataBound"

   
End Sub

 

   
<System.Web.Services.WebMethod()> _

   
Public Shared Function TileMeMeth() As TileMeSilly

       
Return New TileMeSilly

   
End Function

End Class

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 05 Dec 2014, 03:58 PM

Hello,

My very first suggestion is to try to return a simple string and see whether that passes.

Since it is possible that something in the SharePoint environment breaks the webservices and page methods (e.g., the path to the page is changed, and simply "TileMe.aspx" is very likely to return  a 404), I advise that you examine the following post and see how you can make these requests manually with JavaScript: http://blogs.telerik.com/aspnet-ajax/posts/13-03-21/different-ways-to-make-a-request-to-the-server.

Once you can call the page methods and/or web services with pure JavaScript successfully, the same settings (e.g., paths)should work for the LiveTile as well, as it relies on the same basics for the requests it makes.


Regards,

Marin Bratanov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
WebParts for SharePoint
Asked by
Reeba
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or