@(Html.Telerik().TreeView()
.Name(Model.ValueControlId + "projectroom-treeview")
.BindTo(Model.AvailableProjectRooms, mappings =>
{
mappings.For<ProjectRoom>(binding => binding
.ItemDataBound((item, projectRoom) =>
{
item.Value = projectRoom.RoomGUID.ToString();
item.Text = projectRoom.RoomName;
item.ImageUrl = null;
item.Expanded = true;
item.Selected = projectRoom.RoomGUID == Model.SelectedRoomGUID;
}));
})
.ClientEvents(events => events
.OnSelect("onSelectMessage")
)
)