Hello there
I am unable to render the tagcloud in a repeater; it generates the following exception:
I am unable to render the tagcloud in a repeater; it generates the following exception:
Exception type: NullReferenceException
Exception message: Object reference not set to an instance of an object.
at Telerik.Web.UI.RadTagCloud.BindToEnumerableData
I have added some code below to replicate. In this example I have bound the repeater to a simple list.
<%@ Page Language="VB" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> <script runat="server"> Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) If Not IsPostBack Then Dim oDatasource As New List(Of String) oDatasource.Add("Item 1") oDatasource.Add("Item 2") oDatasource.Add("Item 3") oDatasource.Add("Item 4") rp.DataSource = oDatasource rp.DataBind() End If End Sub </script> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:Repeater ID="rp" runat="server"> <ItemTemplate> <telerik:RadTagCloud ID="RadTagCloud1" runat="server" Width="400px"> <Items> <telerik:RadTagCloudItem Text="ASP.NET" Weight="12" /> <telerik:RadTagCloudItem Text="AJAX" Weight="134" /> </Items> </telerik:RadTagCloud> </ItemTemplate> </asp:Repeater> </div> </form> </body> </html>