Kendo TreeView indeterminate checkbox for remote datasource and ondemand loading

The task is to create a Treeview within a web application. The Treeview will contain more than 1k nodes in total and every node should have a checkbox to provide information about the check state of nodes within the tree. Checkboxes can have three states (checked, unchecked and indeterminate for parents where only some children are checked). I used Kendo UI Treeview component to solve the task. The problem was to get the indeterminate state of the checkboxes set without loading all the childnodes into the Treeview. For sure on server site the state information for every node has to be available.

My Solution:
Create a KendoUI Treeview with a checkbox template. Within that template add an attribute (here “data-indeterminate”) in case node is in indeterminate state. Additionally bind an event handler for DataBound (here “updateTree”).

    .Checkboxes(checkboxes =>
    .Events(e => e.DataBound("updateTree"))
    .CheckboxTemplate("<input type='checkbox' name='checkedNodes' value='#= #' #if(item.checked) { # checked # } if(item.indeterminate) { # data-indeterminate # } #/>")
    .DataSource(dataSource => dataSource.Read(read => read.Action("GetNodes", "TreeView")))

In the event handler for Treeview event DataBound find all input tags of type checkbox with attribute data-indeterminate and set the indeterminate state to true.

function updateTree() {
    $('input:checkbox[data-indeterminate]').each(function () {
        $(this)[0].indeterminate = true;

This solution works pretty well for readonly Treeview.

Azure Web / Worker Role in virtual networks

I want to reach from my Azure Webrole an on-premise webservice. But I don’t want to make my on-premise Webservice public available. Site to Site connection sounds to be the solution. (see MSDN But is it possible to to add Azure Web and Workroles to a virtual network created?


The configuration of a virtual network for Web and Workerroles (PaaS) is diffrent to the configuration of a virtual network for a VM (IaaS). While managementportal gives the opportunity to configure a virtual network for a VM there is no such choice when creating a CloudService. In fact that makes sense as a CloudService can host multiple Web and Workerroles. The network configuration for Web and Workerroles is done in the cloud service configuration (*.cscfg) file. There is currently no wizard provided to add the configuration. Add the following configuration to your CloudService config to add your Web and Workerroles to an existing virtual network.

<?xml version="1.0" encoding="utf-8"?>
  <!-- configuration of your roles -->
    <VirtualNetworkSite name="[network name]" />
      <InstanceAddress roleName="[role name]">
          <Subnet name="[name of subnet]" />
      <InstanceAddress roleName="[role name]">
          <Subnet name="[name of subnet]" />