Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
51 views
Hello,

i want to open a radWindow with this page:


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddRelation.aspx.cs" Inherits="EDMS.Web.Userpages.AddRelation" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server"> 
    <title>Untitled Page</title> 
</head> 
<body style="background-color : #E1E1E0"> 
    <form id="form1" runat="server"> 
         
        <telerik:RadScriptManager ID="radScriptManager" runat="server"> 
        </telerik:RadScriptManager> 
         
        <telerik:RadSkinManager ID="radSkinManager" runat="server" Skin="Outlook"> 
        </telerik:RadSkinManager> 
         
        <telerik:RadAjaxManager ID="radAjaxManager" runat="server"> 
        </telerik:RadAjaxManager> 
         
        <telerik:RadAjaxLoadingPanel ID="AjaxLoadingPanel1" runat="server"> 
        </telerik:RadAjaxLoadingPanel> 
     
        <script type="text/javascript"> 
            function GetRadWindow() 
            { 
               var oWindow = null; 
               if (window.radWindow) oWindow = window.radWindow; 
               else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; 
               return oWindow; 
            } 
             
            function returnToParent() 
            { 
                //create the argument that will be returned to the parent page 
                var oArg = new Object(); 
                                 
                //get the selected date from RadGrid 
                var radGrid = $find("<%= radGrid.ClientID %>"); 
                oArg.docId = radGrid.get_selectedValue; 
                                                           
                //get a reference to the current RadWindow 
                var oWnd = GetRadWindow(); 
                 
                //Close the RadWindow and send the argument to the parent page 
                if(oArg.docId) 
                { 
                    oWnd.close(oArg); 
                } 
                else 
                { 
                    alert("Please choose Document"); 
                } 
            } 
        </script> 
         
        <table width="800px"> 
            <tr> 
                <td align="left" style="background-color:White"> 
                    <asp:Image ID="Image1" runat="server" ImageUrl="~/App_Themes/Default/Images/iflowsIcon.jpg"/> 
                    <strong><asp:Label ID="lblDocumentSearch" runat="server" OnLoad="OnLabelLoad" Text="documentsearch" style="padding: 5px;"></asp:Label></strong> 
                </td> 
            </tr> 
            <tr> 
                <td class="mytableGraySeperator"> 
                </td> 
            </tr> 
            <tr> 
                <td> 
                    <telerik:RadPanelBar runat="server" ID="panelBarSearch" AllowCollapseAllItems="false" ExpandMode="SingleExpandedItem" Width="800"> 
                        <Items> 
                            <telerik:RadPanelItem Expanded="true" Text="simplesearch" Value="simplesearch" runat="server" OnLoad="OnPanelItemLoad"> 
                                <Items> 
                                    <telerik:RadPanelItem> 
                                        <ItemTemplate> 
                                            <table> 
                                                <tr> 
                                                    <td> 
                                                        <asp:Label ID="lblSearchAlltextFields" runat="server" Text="searchalltextfields" OnLoad="OnLabelLoad"></asp:Label> 
                                                    </td> 
                                                    <td> 
                                                        <telerik:RadTextBox ID="txbSearchAllTextFields" runat="server"></telerik:RadTextBox> 
                                                    </td> 
                                                    <td align="right"> 
                                                        <asp:Button ID="btnSimpleSearch" Text="Search" runat="server" OnClick="btnSimpleSearch_Click"/> 
                                                    </td>                                   
                                                </tr> 
                                            </table> 
                                        </ItemTemplate> 
                                    </telerik:RadPanelItem> 
                                </Items> 
                            </telerik:RadPanelItem> 
                            <telerik:RadPanelItem Expanded="false" Text="detailsearch" Value="detailsearch" runat="server" OnLoad="OnPanelItemLoad"> 
                                <Items> 
                                    <telerik:RadPanelItem> 
                                        <ItemTemplate> 
                                            <table> 
                                                <tr> 
                                                    <td> 
                                                        <asp:Label ID="lblCategory" runat="server" Text="category" OnLoad="OnLabelLoad"></asp:Label> 
                                                    </td> 
                                                    <td> 
                                                        <telerik:RadComboBox ID="cobxCategory" runat="server" MarkFirstMatch="true"></telerik:RadComboBox> 
                                                    </td> 
                                                    <td> 
                                                        <asp:Label ID="lblName" runat="server" Text="documentname" OnLoad="OnLabelLoad"></asp:Label> 
                                                    </td> 
                                                    <td> 
                                                        <telerik:RadTextBox ID="txbName" runat="server"></telerik:RadTextBox> 
                                                    </td> 
                                                    <td> 
                                                        <asp:Label ID="lblDescription" runat="server" Text="description" OnLoad="OnLabelLoad"></asp:Label> 
                                                    </td> 
                                                    <td> 
                                                        <telerik:RadTextBox ID="txbDescription" runat="server"></telerik:RadTextBox> 
                                                    </td>                                     
                                                </tr> 
                                                <tr> 
                                                    <td> 
                                                        <asp:Label ID="lblFileSize" runat="server" Text="filesize" OnLoad="OnLabelLoad"></asp:Label> 
                                                    </td> 
                                                    <td> 
                                                        <telerik:RadComboBox ID="cobxFileSize" runat="server" MarkFirstMatch="true"></telerik:RadComboBox> 
                                                    </td> 
                                                    <td> 
                                                        <asp:Label ID="lblCreater" runat="server" Text="creater" OnLoad="OnLabelLoad"></asp:Label> 
                                                    </td> 
                                                    <td> 
                                                        <telerik:RadTextBox ID="txbCreater" runat="server"></telerik:RadTextBox> 
                                                    </td> 
                                                    <td> 
                                                        <asp:Label ID="lblPhysicalStorage" runat="server" Text="physicalstorage" OnLoad="OnLabelLoad"></asp:Label> 
                                                    </td> 
                                                    <td> 
                                                        <telerik:RadTextBox ID="txbPhysicalStorage" runat="server"></telerik:RadTextBox> 
                                                    </td>                                     
                                                </tr> 
                                                <tr> 
                                                    <td> 
                                                        <asp:Label ID="lblFileExtension" runat="server" Text="fileextension" OnLoad="OnLabelLoad"></asp:Label> 
                                                    </td> 
                                                    <td> 
                                                        <telerik:RadComboBox ID="cobxFileExtension" runat="server" MarkFirstMatch="true"></telerik:RadComboBox> 
                                                    </td> 
                                                    <td> 
                                                        <asp:Label ID="lblCreatedDateFrom" runat="server" Text="createddatefrom" OnLoad="OnLabelLoad"></asp:Label> 
                                                    </td> 
                                                    <td> 
                                                        <telerik:RadDatePicker ID="datePickerCreatedFrom" runat="server" ></telerik:RadDatePicker> 
                                                    </td> 
                                                    <td> 
                                                        <asp:Label ID="lblCreatedDateTo" runat="server" Text="createddateto" OnLoad="OnLabelLoad"></asp:Label> 
                                                    </td> 
                                                    <td> 
                                                        <telerik:RadDatePicker ID="datePickerCreatedTo" runat="server" ></telerik:RadDatePicker> 
                                                    </td> 
                                                </tr> 
                                                <tr> 
                                                    <td> 
                                                        <asp:Label ID="lblDocumentState" runat="server" Text="state" OnLoad="OnLabelLoad"></asp:Label> 
                                                    </td> 
                                                    <td> 
                                                        <telerik:RadComboBox ID="cobxDocumentState" runat="server" MarkFirstMatch="true"></telerik:RadComboBox> 
                                                    </td> 
                                                    <td> 
                                                        <asp:Label ID="lblLastEditedDateFrom" runat="server" Text="lastediteddatefrom" OnLoad="OnLabelLoad"></asp:Label> 
                                                    </td> 
                                                    <td> 
                                                        <telerik:RadDatePicker ID="datePickerLastEditedFrom" runat="server" ></telerik:RadDatePicker> 
                                                    </td> 
                                                    <td> 
                                                        <asp:Label ID="lblLastEditedDateTo" runat="server" Text="lastediteddateto" OnLoad="OnLabelLoad"></asp:Label> 
                                                    </td> 
                                                    <td> 
                                                        <telerik:RadDatePicker ID="datePickerLastEditedTo" runat="server" ></telerik:RadDatePicker> 
                                                    </td> 
                                                </tr> 
                                                <tr> 
                                                    <td align="right" colspan="6"> 
                                                        <asp:Button ID="btnDetailSearch" Text="Search" runat="server" OnClick="btnDetailSearch_Click"/> 
                                                    </td> 
                                                </tr> 
                                            </table> 
                                        </ItemTemplate> 
                                    </telerik:RadPanelItem> 
                                </Items> 
                            </telerik:RadPanelItem> 
                        </Items> 
                    </telerik:RadPanelBar> 
                </td> 
            </tr> 
            <tr> 
                <td align="left"> 
                    <asp:Label ID="lblFoundDocuments" runat="server" Text="documentsfound"></asp:Label> 
                </td> 
            </tr> 
        </table> 
     
        <table cellpadding="0" cellspacing="0" width="800px"> 
            <tbody valign="top"> 
                <tr> 
                    <td align="left" style="background-color:White"> 
                        <asp:Image ID="imgIcon" runat="server" ImageUrl="~/App_Themes/Default/Images/iflowsIcon.jpg"/> 
                        <strong><asp:Label ID="lblTitle" runat="server" Text="chooseDocument" OnLoad="OnLabelLoad" style="padding: 5px;"></asp:Label></strong> 
                    </td> 
                </tr> 
                <tr> 
                    <td class="mytableDarkBlueSeperator"> 
                    </td> 
                </tr> 
                <tr> 
                    <td> 
                        <telerik:RadGrid ID="radGrid" runat="server" 
                                            AllowPaging="True"  
                                            PageSize="20" 
                                            AutoGenerateColumns="False" 
                                            GridLines="Both" 
                                            OnNeedDataSource="Radgrid_NeedDatasource"> 
                             
                            <MasterTableView DataKeyNames="id"> 
                                <CommandItemTemplate> 
                                    <div style="padding: 5px 5px;"> 
                                        <img onload="returnToParent" style="border:0px;vertical-align:middle;" alt="" src="../App_Themes/Default/Images/file_icon.gif"/> 
                                        <asp:Label ID="lblChooseDocument" runat="server" Text="choosedocument" OnLoad="OnLabelLoad"></asp:Label> 
                                    </div> 
                                </CommandItemTemplate> 
                                                                                     
                                <Columns> 
                                 
                                    <telerik:GridBoundColumn DataField="id" Visible="false"></telerik:GridBoundColumn> 
                                        <telerik:GridTemplateColumn> 
                                            <ItemTemplate> 
                                                <asp:Image runat="server" ID="imgNew" 
                                                    OnLoad="OnImageLoad" /> 
                                                <asp:TextBox ID="txbCreatedDate" runat="server" 
                                                    Visible ="false" 
                                                    Text='<%# DataBinder.Eval(Container.DataItem,"created_date").ToString() %>' /> 
                                            </ItemTemplate> 
                                        </telerik:GridTemplateColumn> 
                                        <telerik:GridHyperLinkColumn DataTextField="Metainformation.name" HeaderText="Profile" DataNavigateUrlFormatString="DocumentProfile.aspx?id={0}" DataNavigateUrlFields="id" ></telerik:GridHyperLinkColumn> 
                                        <telerik:GridBoundColumn DataField="Category.name" HeaderText="Kategorie"></telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="User.lastname" HeaderText="Ersteller"></telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="created_date" HeaderText="Erstellungsdatum"></telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="User1.lastname" HeaderText="letzter Bearbeiter"></telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="checkout_date" DataType="System.DateTime" HeaderText="in Verwendung seit"></telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="Folder.name" HeaderText="Ordner"></telerik:GridBoundColumn> 
                                         
                                    </Columns> 
                                       
                                    <RowIndicatorColumn> 
                                        <HeaderStyle Width="20px"></HeaderStyle> 
                                    </RowIndicatorColumn> 
 
                                    <ExpandCollapseColumn> 
                                        <HeaderStyle Width="20px"></HeaderStyle> 
                                    </ExpandCollapseColumn> 
                                </MasterTableView>           
                        </telerik:RadGrid> 
                    </td> 
                </tr> 
            </tbody> 
        </table> 
         
         
    </form> 
</body> 
</html> 
 


The Radwindow opens, but it gives me following errormessage:

german:

Die Steuerelementauflistung kann nicht geändert werden, da das Steuerelement Codeblöcke enthält

english maybe:

The controllisting cant be changed, because the control contains code.

Question 1: Anyone got the same error?

Question 2:

I want to return the id that is the DatakeyValue of a selected row to the parent page.

                var radGrid = $find("<%= radGrid.ClientID %>"); 
                oArg.docId = radGrid.get_selectedValue; 

Do i do it correct or how can i access the radgrid key value of a row via javascript?

cheers mario
Georgi Tunev
Telerik team
 answered on 22 Jul 2009
5 answers
473 views

Hi,

I have splitter in an aspx page (this aspx page does inherit a Master Page). This splitter has a LEFT Pane and a RIGHT Pane. The Left Pane has a TREE, the contents of this TREE are populated from database. This TREE has Parent Nodes and Child Nodes. On clicking the Parent nodes their child nodes are displayed.  NOW clicking the child nodes will open an aspx page in the RIGHT Pane. Basically the child nodes contain NavigationUrl, so that when a user clicks it, an aspx page is opened in the RIGHT pane.

Now regarding RIGHT pane: User types data in textboxes, text area… There is also a SAVE button in the aspx page that was loaded in the RIGHT Pane.

When User clicks the SAVE button in the Right Pane, I want Only that Parent Node and THAT Clicked Child NODE to be refreshed, NOT the entire tree.

Can anyone HELP, PLEASE!!!

AL
Top achievements
Rank 1
 answered on 22 Jul 2009
6 answers
275 views


Hello Telerik Team,

I'm using the manual binding way to bind my data [ not using controls, binding @ page-behind code ]

My question is, when the user clicks edit :
1 - How to get the selected row values [ cuz I want to get the text in that row and place it in the controls in the EditItemTemplate ]
2 - @Update click, how to get the values from these textboxes ?!

Please, Note that I read the documentation but its not helping since its using the SqlDataSource control.

Your hints are highly appreciated.
Best Regards,
Monalisa
Top achievements
Rank 1
 answered on 22 Jul 2009
14 answers
691 views
I am trying to create a RadComboBox strictly using only the code behind.  I am coming into a problem.  I can create the object and populate it with data but when I try to click on the drop down to view and select the data I have stored in it nothing happens. Basically it is not letting me have access to my data.  When I add the <telerik:RadComboBox> tag to the design page and give it the same ID name that I did my object I created on the code behind it works just fine but this is not how I need to have it created.  Can you help me figure out what I am missing or what I am doing wrong?

Thanks,

Kyle
Kyle Jones
Top achievements
Rank 1
 answered on 22 Jul 2009
0 answers
69 views
Does anyone have a sample code for sorting the header columns in a multi-column combo box?

Thanks
Telerikuser
Top achievements
Rank 1
 asked on 22 Jul 2009
1 answer
154 views
Hi,
Is there a way to highlight specific words from a dictionary in the editor?
I want to use this as a sql editor, so if I can highlight SELECT, FROM, WHERE etc. as the user types,
that would be great.

Thanks for your help.
Rumen
Telerik team
 answered on 22 Jul 2009
1 answer
63 views
I am currently running a 2.0 Framework website with RadControls for ASP.NET Q2 2008 Telerik controls.
I would like to use RadControls for ASP.NET AJAX. I need a step by step details of how to convert to this new version that we currently own but can't get to work.

Thanks,
Ryan
Svetlina Anati
Telerik team
 answered on 22 Jul 2009
1 answer
111 views

I have a scenario where I'm populating my entire RadMenu using javascript.

After the first rollover, all of the top tier menu items shift a little to the right.  Then they stay put and don't move again. From the user point of the shift is very noticeable.  The effect is the same as an image that is placed on a page without width and height attributes. When it loads, it jumps.

When I recreate the same exact menu using a traditional asp.net page (no javascript), I do not get this problem.

I have tried both standard skins as well as custom skins. Same problem.

Any help would be great

Thanks
Jerry

I tried to post a sample of the code in this forum, but the script gets altered.
You can download the sample from here

http://www.genginedata.com/menusample.zip

Paul
Telerik team
 answered on 22 Jul 2009
1 answer
141 views
Is it possible to set level/depth for a node through javascript? If so please provide me with a sample.

Thanks
Princy
Top achievements
Rank 2
 answered on 22 Jul 2009
2 answers
363 views

 

I can't seem to get the content of a RadEditor2 control to update after the following code is ran.
However the ClickedNodeLabel.Text (an ASP Label control) updates just fine.

protected
void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)

{

 

//Use the Deserialize method to create a RadTreeNode object from the JSON string representing the node

 

 

 

 

RadTreeNode clickedNode = new JavaScriptSerializer().Deserialize<RadTreeNode>(e.Argument);

 

 

RadEditor2.Content = clickedNode.Text;

ClickedNodeLabel.Text = clickedNode.Text;

}
Thank you for your help.
-Dan
here's the client side code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DefaultTV.aspx.cs" Inherits="Pages_DefaultTV" %>

<%

 

@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

<%

 

@ Register Assembly="RichTextEditor" Namespace="AjaxControls" TagPrefix="cc3" %>

<%

 

@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> 

 

<!

 

 

 

 

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

 

 

 <

 

html xmlns="http://www.w3.org/1999/xhtml">

 

 

 <

 

head id="Head1" runat="server">

 

 

 

 

<link href="Site.css" rel="stylesheet" type="text/css" />

 

 

 

 

<style type="text/css">

 

 

 

 

 

span#total,

 

 

 

#ClickedNodeLabelPanel

 

{

 

display: inline !important;

 

 

 

font-style:italic;

 

}

 

.RadTreeView { border: 1px solid #CBE7F5; }

 

 

#ConfiguratorPanel1 ul

 

 

{

 

margin:0;

 

 

padding:0;

 

 

list-style:none;

}

 

#ConfiguratorPanel1 li

 

{

 

line-height: 28px;

 

}

 

#ConfiguratorPanel1 li label

 

{

 

padding: 0 7px;

 

}

 

</style>

 

 

</

 

 

head>

 

<

 

 

body>

 

 

 

<form runat="server" id="Form1" method="post">

 

 

 

<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />

 

 

 

<telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" OnAjaxRequest="RadAjaxManager1_AjaxRequest">

 

 

 

<AjaxSettings>

 

 

 

<telerik:AjaxSetting AjaxControlID="RadAjaxManager1">

 

 

<UpdatedControls>

 

 

 

<telerik:AjaxUpdatedControl ControlID="ClickedNodeLabel" />

 

 

 

</UpdatedControls>

 

 

 

 

</telerik:AjaxSetting>

 

 

 

 

</AjaxSettings>

 

 

</telerik:RadAjaxManager>

 

 

<ul>

 

 

<li style="width:300px;border:none;"><label>Load time:</label><span id="Span1">Expand the 'Root Node' to see the load time</span></li>

 

 

 

<li style="width:220px;"><label>Number of nodes to load:</label>

 

 

 

<telerik:RadNumericTextBox runat="server" ID="NodeCountTextBox" Value="1000" MaxValue="4000"

 

 

 

MinValue="100" Width="60px" ShowSpinButtons="True">

 

 

<NumberFormat DecimalDigits="0" />

 

 

</telerik:RadNumericTextBox></li>

 

 

 

<li><label>Clicked node:</label><asp:Label runat="server" ID="ClickedNodeLabel" Text="None" /></li>

 

 

 

<telerik:RadEditor ID="RadEditor2" runat="server" Width="97%">

 

 

 

</telerik:RadEditor></ul>

 

 

<div id="topPane">

 

 

 

<h1>eTariff Editor</h1>

 

 

 

<asp:LinkButton ID="LinkButton1" runat="server" Style="position: absolute; left: 200px;

 

 

 

top: 75px" Width="125px">Open</asp:LinkButton>

 

 

 

<asp:LinkButton ID="LinkButton2" runat="server" Style="position: absolute; left: 250px;

 

 

 

top: 75px" Width="125px">Save</asp:LinkButton>

 

 

 

 

 

<asp:LinkButton ID="LinkButton3" runat="server" Style="position: absolute; left: 300px;

 

 

 

top: 75px" Width="125px">Submit</asp:LinkButton>

 

 

 

</div>

 

 

 

<div id="treePane">

 

 

<div>

 

 

<cc1:DragPanelExtender ID="DragPanelExtender1" runat="server" TargetControlID="Panel1" DragHandleID="RadTreeView1"></cc1:DragPanelExtender>

 

 

 

<cc1:ResizableControlExtender ID="ResizableControlExtender1" runat="server" TargetControlID="Panel2" HandleCssClass="handle" ResizableCssClass="resizing" ></cc1:ResizableControlExtender>

 

 

</div>

 

 

 

 

<asp:Panel ID="Panel1" runat="server" Height="575px" ScrollBars="None" Width="174px">

 

 

 

<asp:Panel ID="Panel2" runat="server" Height="100%" ScrollBars="Both" Width="100%" BackColor="whitesmoke">

 

 

 

 

 

<telerik:RadTreeView ID="RadTreeView1" runat="server" Height="100%" Width="100%"

 

 

 

PersistLoadOnDemandNodes="false" LoadingStatusPosition="BelowNodeText"

 

 

OnClientNodePopulating="nodePopulating" OnClientNodePopulated="nodePopulated"

 

 

 

OnClientNodeCollapsed="nodeCollapsed" OnClientNodeClicked="nodeClicked">

 

 

<WebServiceSettings Path="~/Services/Default.asmx" Method="GetChildNodes" />

 

 

 

</telerik:RadTreeView>

 

 

 

</asp:Panel>

 

 

 

</asp:Panel>

 

 

 

</div>

 

 

 

<div id="editorPane">

 

 

 

<div>

 

 

 

<cc1:DragPanelExtender ID="DragPanelExtender3" runat="server" TargetControlID="Panel3" DragHandleID="Panel4"></cc1:DragPanelExtender>

 

 

 

<cc1:ResizableControlExtender ID="ResizableControlExtender3" runat="server" TargetControlID="Panel3" HandleCssClass="handle" ResizableCssClass="resizing"></cc1:ResizableControlExtender>

 

 

 

</div>

 

 

 

<asp:Panel ID="Panel3" runat="server" Height="600px" ScrollBars="None" Width="800px" >

 

 

 

<asp:Panel ID="Panel4" runat="server" Height="100%" ScrollBars="Both" Width="100%" BackColor="whitesmoke">

 

<%

 

-- <ConfiguratorPanel runat="server" ID="ConfiguratorPanel1" Expanded="true">

 

<cc3:RichTextEditor id="Rte1" Theme="classic" runat="server" Width="97%" Font-Strikeout=true ></cc3:RichTextEditor>

--

 

 

%> <telerik:RadEditor ID="RadEditor1" runat="server" Width="97%">

 

 

 

</telerik:RadEditor>

 

 

 

</asp:Panel>

 

 

 

</asp:Panel>

 

 

 

</div>

 

 

 

<telerik:RadScriptBlock runat="Server" ID="RadScriptBlock1">

 

 

 

<script type="text/javascript">

 

 

 

var startTime;

 

 

 

function nodePopulating(sender, args) {

 

 

 

//Pass the number of nodes to the web service method

 

var input = $find("<%= NodeCountTextBox.ClientID %>");

 

 

 

if (args.get_context())

 

args.get_context().NumberOfNodes = input.get_value();

 

 

//Log the start time

 

startTime =

 

new Date();

 

}

 

 

function nodePopulated(sender, args) {

 

 

 

//Log the end time

 

 

var endTime = new Date();

 

 

 

 

//Display the total time

 

$get(

 

"total").innerHTML = endTime - startTime + "ms";

 

}

 

 

function nodeCollapsed(sender, args) {

 

 

 

//Clear the nodes populated on demand

 

 

 

 

 

 

resetNode(args.get_node());

}

 

 

function resetNode(node) {

 

node.get_nodes().clear();

node.set_expandMode(Telerik.Web.UI.TreeNodeExpandMode.WebService);

}

 

 

function nodeClicked(sender, args) {

 

 

 

var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");

 

 

 

//Send an Ajax request containing the JSON representation of the clicked node. The AjaxRequest will be fired in codebehind.

 

 

 

 

 

 

ajaxManager.ajaxRequest(args.get_node().toJsonString());

}

 

 

</script>

 

 

</telerik:RadScriptBlock>

 

 

</form>

 

</

 

 

body>

 

</

 

 

html>

 

 

 

Daniel
Top achievements
Rank 1
 answered on 22 Jul 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?