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

Wrapping Leaf items to node

3 Answers 51 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Xavier
Top achievements
Rank 1
Xavier asked on 25 Jul 2011, 04:10 PM
Hi,

Telerik in webpage is loading very slowly when i am drilling down further on the final node.Can i able to limit that ?
I have tree like below.

Root Node:
    Node 1
    Node 2
    Node 3
        Node 3.1
        Node 3.2
            Node 3.2.1

For example In the node 3.2.1,its having 30 items ,if the item count is > 20 , i need to create a new node called "showallitems" and display all the 20 items under "showallitems".
        
Please help me.

Regards,
Xavier

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 28 Jul 2011, 10:05 AM
Hi Xavier,

Please take a look at the RadTreeNodeCollection and use the insertNode and deleteNode methods in onClientNodeExpanding client-side event.

Greetings,
Plamen Zdravkov
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Xavier
Top achievements
Rank 1
answered on 05 Aug 2011, 01:06 PM
Thanks i have added the node with the program flow as a new node with the text "ShowAllItems". and i am also added the items except it under node 2.1 in below show all items.

Now my Tree is like this,

Node 1
Node 2
Node 2.1
Item 1
Item 2
ShowAllItems
Item 3
Item 4

when i am expanding the showAllItems node, i want to move the item 3 and 4 under the node 2.1 next to item 2 and to remove showAllItems after that.

Is it possible, coz i am loading the items 3 & 4 onexpand_event of showAllItems. All Above things i am doing on server side.

Please help me.

Regards,
Xavier




0
Plamen
Telerik team
answered on 10 Aug 2011, 04:15 PM
Hello Xavier,

You can try this code where "RadTreeView1" is the ID of the RadTreeView:
protected void RadTreeView1_NodeExpand(object sender, RadTreeNodeEventArgs e)
   {
      RadTreeNode node1 = e.Node;
      RadTreeView1.Nodes.Add(node1);
   }

Hope this will be helpful.


Regards, Plamen Zdravkov
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
TreeView
Asked by
Xavier
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Xavier
Top achievements
Rank 1
Share this question
or