<%@ Page Title="" Language="C#" MasterPageFile="~/FunctionalityMasterPage.master" AutoEventWireup="true" CodeFile="Test_Wait.aspx.cs" Inherits="Test_Wait" %> <asp:Content ID="Content1" ContentPlaceHolderID="cphHeader" runat="Server"> <script type="text/javascript"> //<![CDATA[ var toHide = false; function OnClientBeforeHide(sender, args) { if (!toHide) args.set_cancel(true); } function OnClientBeforeShow(sender, args) { sender.set_modal(sender.get_modal()); } //Attach to event that will indicate when ajax request is complete Sys.WebForms.PageRequestManager.getInstance().add_beginRequest ( function (sender, args) { toHide = false; if (args.get_postBackElement().id == "Button1") { var tooltip = $find("<%=RadToolTip1.ClientID%>"); tooltip.show(); } } ); function GetActiveToolTip() { var tooltip = Telerik.Web.UI.RadToolTip.getCurrent(); return tooltip; } //Attach to event that will indicate when ajax request is complete Sys.WebForms.PageRequestManager.getInstance().add_endRequest ( function (sender, args) { var tooltip = GetActiveToolTip(); if (tooltip != null && tooltip.get_id() == "RadToolTip1") { toHide = true; tooltip.hide(); } } ); //]]> </script> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="cphContent" runat="Server"> <telerik:RadToolTip ID="RadToolTip1" IsClientID="false" runat="server" Modal="true" ShowEvent="FromCode" Position="Center" RelativeTo="BrowserWindow" OnClientBeforeShow="OnClientBeforeShow" OnClientBeforeHide="OnClientBeforeHide" Width="140px" EnableShadow="true" HideEvent="FromCode"> <img src='Images/Icons/loading.gif' alt="loading" style="margin-left: 35px;" /> </telerik:RadToolTip> <asp:Panel ID="Panel1" runat="server" BorderColor="White"> <table> <tr> <td style="width: 50px;"> </td> <td> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:ImageButton ID="Button1" ImageUrl="Images/Icons/send_sms.png" runat="server" OnClick="Button1_Click" CssClass="button" Style="display: block; float: left;" /> </ContentTemplate> </asp:UpdatePanel> </td> </tr> <tr> <td style="width: 50px;"> </td> <td> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> </td> </tr> </table> </asp:Panel> </asp:Content> I'm currently evaluating the TreeView for the following Scenario:
So I want to load only the root and the first sublevel of items and then lazy load items as nodes are expanded. My Questions:

@model List<Project.Models.VW_VisitasPorNumeroVisitas>@{ ViewBag.Title = "Index";}<h2>Visitas por Numero de Visitas</h2>@(Html.Telerik().Grid(Model) .Name("RadGrid1") .Sortable() .Filterable() .Pageable() .Footer(true) .NoRecordsTemplate("No hay registros") .Columns(columns => { columns.Bound(o => o.NumVisitas) .Title("Numero de Visitas") .Aggregate(agg => agg.Sum()) .FooterTemplate(@<text> Visitas Totales: <span >@item.Sum</span> </text>); columns.Bound(o => o.TotalVisitas) .Title("Cantidad de Visitas"); columns.Bound(o => o.NumVisitas) .Title("% Visitas"); }) )public ActionResult Index(){ var visitasPorNum = from a in db.VW_VisitasPorNumeroVisitas select a; return View(visitasPorNum.ToList());}<
telerik:RadListBox ID="PageHierarchies" runat="server" Width="200px" Height="200px"
TransferToID="ColumnHierarchies" AllowReorder="true" AutoPostBackOnReorder="false"
AllowTransfer="true" AutoPostBackOnTransfer="false" EnableDragAndDrop="true"
AutoPostBack="false" OnClientDragging="DraggingItem" OnClientTransferred="ItemTransferrd" AllowAutomaticUpdates="true" EnableViewState="true" PersistClientChanges=true >
<ButtonSettings ShowReorder="false" ShowTransfer="false" ShowTransferAll="false" />
</telerik:RadListBox>
Javascipt code to add attributes (higlighted in italic bold)
<
script type="text/javascript">
//<![CDATA[
var columnHirachcy;
var rowHirachcy;
var pageHirachcy;
var dimname;
var dimID;
var infosetname;
var strParms;
function
pageLoad(sender)
{
var listboxItem;
var membersCount;
var items;
var objJson;
columnHirachcy = $find(
"<%= ColumnHierarchies.ClientID %>");
rowHirachcy = $find(
"<%= RowHierarchies.ClientID %>");
pageHirachcy = $find(
"<%= PageHierarchies.ClientID %>");
objJson=window.top.GetIFrame().document[
'report1_json'];
//Column Hiraarchy
infosetname=objJson[0].name;
var infosetObj = window.top.getInfoSetByName(infosetname);
for(axisIndex=0;axisIndex<=2;axisIndex++)
{
switch(axisIndex)
{
case 0:
items=columnHirachcy;
break;
case 1:
items=rowHirachcy;
break;
case 2:
items=pageHirachcy;
break;
}
var dimCollection = infosetObj['axis' + axisIndex];
for(i=0;i<dimCollection.length;i++)
{
dimID = dimCollection[i].uname;
dimName = dimCollection[i].name;
membersCount =window.top.getMembersCount(infosetname,dimName,axisIndex,i);
var listboxItem =new Telerik.Web.UI.RadListBoxItem();
listboxItem.set_text(dimName +
"[" + membersCount + "]");
listboxItem.set_value(dimID);
listboxItem.set_selected(
false);
listboxItem.set_imageUrl(
"../Images/Filter.gif");
items.trackChanges();
items.get_items().add(listboxItem);
items.getItem(i).get_imageElement().setAttribute(
"alt",dimName);
items.getItem(i).get_imageElement().setAttribute(
"infosetName",infosetname);
items.getItem(i).get_imageElement().setAttribute(
"dimName",dimName);
items.getItem(i).get_imageElement().setAttribute(
"dimID",dimID);
items.getItem(i).get_imageElement().setAttribute(
"PivotingMode","Full");
items.getItem(i).get_imageElement().setAttribute(
"Hirarchy",listboxItem);
items.getItem(i).get_imageElement().onclick=
function(){
window.top.openSelectorForPivoting(
this.getAttribute('infosetName'),this.getAttribute('dimName'),this.getAttribute('dimID'),this.getAttribute('PivotingMode'),this.getAttribute('Hirarchy'));
};
items.commitChanges();
}
}
return false;
}