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

Tagcloud in a repeater

1 Answer 51 Views
TagCloud
This is a migrated thread and some comments may be shown as answers.
d
Top achievements
Rank 1
d asked on 06 Mar 2011, 12:23 PM
Hello there

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>
<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>

1 Answer, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 09 Mar 2011, 09:11 PM
Hello,

This is a known issue of the TagCloud control and it is already fixed. You should download the latest internal build or the Q1 2011 Beta release, where the fix is available.

Best wishes,
Pero
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
TagCloud
Asked by
d
Top achievements
Rank 1
Answers by
Pero
Telerik team
Share this question
or