America/US Samples
Europe Samples
Asia Samples

Gaia Ajax: TreeView - Data Binding

This sample shows how you can fill your treeview with items from a datasource. Note that the Gaia Ajax TreeView doesn't have a DataSource property. This is due to the fact that the Gaia Ajax TreeView is an on demand loading TreeView, so it doesn't make sense to prefill it with data.


Markup (ASPX/.aspx)

   1:   
   2:  <div class="container-tree">
   3:      <gaia:TreeView runat="server" ID="zTree">
   4:          <gaia:TreeViewItem runat="server" ID="zTreeRoot" CssClass="gaiax"
   5:              IsLeaf="false" Collapsed="true" IconCssClass="folder" OnGetChildrenControls="zTreeRoot_OnGetChildrenControls">
   6:              My Calendar
   7:          </gaia:TreeViewItem>
   8:      </gaia:TreeView>
   9:      </div>
  10:      <div class="container-selected-item">
  11:          <gaia:Label ID="zActivityDate" runat="server" Font-Underline="true" /><br />
  12:          <gaia:Label ID="zActivityName" runat="server" Font-Size="Large" /><br />
  13:          <gaia:Label ID="zMoreInfo" runat="server" />
  14:      </div>
  15:      <br style="clear: both" />
  16: