This is a migrated thread and some comments may be shown as answers.

radtreeview and ServerSideCallBack

3 Answers 120 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Bob
Top achievements
Rank 1
Bob asked on 21 Jul 2008, 10:26 PM
Hi Folks,
Having a problem getting the client to display the new nodes once I expand the node.
I'm assuming that since I just started today with telerik controls, that I'm missing the container or control that does the the async callback display update stuff?
I just don't know what it is, and I didn't see it in any of the samples.

I'm positive that the nodes are being added. Code followed by the .aspx

Select Case e.Node.Level

Case 0 ' category

For Each thisCategory As nPOSCategory In CType(GetAnEntity(GetType(nPOSStoreType), e.Node.Value), nPOSStoreType).Categories

Dim thisNode As New RadTreeNode(thisCategory.CategoryName, thisCategory.Id)

If thisCategory.Items.Count > 0 Then

thisNode.ExpandMode = TreeNodeExpandMode.ServerSideCallBack

End If

RadTreeView1.Nodes.Add(thisNode)

Next

e.Node.Expanded =

True

Case 1 ' item

End Select

*******************************************************
Here are the .aspx bits:

<telerik:RadScriptManager ID="ScriptManager1" runat="server" EnableTheming="True">

</telerik:RadScriptManager>

<div>

</div>

<telerik:RadSplitter ID="RadSplitter1" runat="server" Items-Capacity="4" LiveResize="True" Skin="WebBlue" SplitBarsSize="">

<telerik:RadPane ID="RadPane1" runat="server">

<telerik:RadTreeView ID="RadTreeView1" runat="server" Skin="WebBlue">

<CollapseAnimation Duration="100" Type="OutQuint" />

<ExpandAnimation Duration="100" />

</telerik:RadTreeView>

</telerik:RadPane>

<telerik:RadSplitBar ID="RadSplitBar1" runat="server" />

<telerik:RadPane ID="RadPane2" runat="server">

<telerik:RadSplitter ID="RadSplitter2" runat="server" Orientation="Horizontal" Skin="WebBlue">

<telerik:RadPane ID="RadPane3" runat="server">

future

</telerik:RadPane>

<telerik:RadSplitBar ID="RadSplitBar2" runat="server" />

<telerik:RadPane ID="RadPane4" runat="server">

future

</telerik:RadPane>

</telerik:RadSplitter>

</telerik:RadPane>

</telerik:RadSplitter>

<asp:Button ID="btnReset" runat="server" Text="Reset Page" />

<telerik:RadAjaxManager runat="server">

<AjaxSettings>

<telerik:AjaxSetting AjaxControlID="RadTreeView1">

<UpdatedControls>

<telerik:AjaxUpdatedControl ControlID="RadTreeView1" />

</UpdatedControls>

</telerik:AjaxSetting>

</AjaxSettings>

</telerik:RadAjaxManager>

3 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 22 Jul 2008, 06:47 AM
Hi,

RadTreeView does not require any additional control to perform server-side-callback load on demand. Please check our online demo here.

I've noticed that you are setting the Expanded property of the on demand created nodes. By doing this the node will render as expanded and will not trigger any load on demand requests.

Regards,
Albert
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Bob
Top achievements
Rank 1
answered on 22 Jul 2008, 12:56 PM
I took out the 

e.Node.Expanded = True
Any other idea why it's not updating?
Will look at the sample some more.

0
Bob
Top achievements
Rank 1
answered on 22 Jul 2008, 06:41 PM
nm, found it

In nodeExpand I had
RadTreeView1.Nodes.Add(thisNode)
instead of
e.node.nodes.add...
Tags
TreeView
Asked by
Bob
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Bob
Top achievements
Rank 1
Share this question
or