New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Programmatic DataBinding

IEnumerable

To bind RadTreeMap programmatically, take the following steps in in the code-behind:

  • Set the DataSource property. This property points a data source such as a DataSet, DataTable, DataReader, ArrayList, etc.
  • Call the DataBind method on page load.
  • DefaultVB.aspx
  • DefaultVB.aspx.vb
  • styles.css
<%@ Page AutoEventWireup="false" CodeFile="DefaultVB.aspx.vb" Inherits="TreeMap.Functionality.Programatic.DefaultVB"Language="vb"  %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link rel="stylesheet" type="text/css" href="styles.css" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div class="demo-container no-bg">
        <p>IEnumerable</p>
        <telerik:RadTreeMap RenderMode="Lightweight" runat="server" ID="TreeMap1" DataFieldID="ID" DataFieldParentID="ParentID" DataTextField="Text" DataValueField="Value">
        </telerik:RadTreeMap>
    </div>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance