Radcontrols controls of telerik (4)

Source: Internet
Author: User

Friends and colleagues will learn from the three articles in the previous series "Learn telerik's radcontrols controls". You will surely feel a surging sensation in your heart, and you will feel a sense of hate when you meet radcontrols. Join with Xiaojun to learn about the radcontrols control and provide it friends with a better technical feast. Thank you ......

Today I will share with you another more perfect technical control (telerikRadtreeview) Control:

Radtreeview Is an ASP. Net Control with rich functions. It makes it easy to display, manage, and navigate hierarchical data. This product provides rich advanced features such as drag-and-drop and load as needed (msdn-style ), right-click context menu, combo box mode, automatic SQL binding, and other features. Summary:

    • Load giant structures as needed
      If your Treeview has a large number of nodes, you can load only the displayed part and load the required part as needed, just like the menus in msdn.
    • Drag and Drop
      This feature allows you to re-layout the structure of R. A. D. Treeview and automatically trigger corresponding server events.
    • Select multiple nodes at the same time (CTRL + select)
      You can select multiple nodes at the same time. When the server side time is submitted, all selected node information is automatically submitted to the server side.
    • Tree-view ComboBox Mode
      This is a major feature of R. A. D. Treeview. You can customize the Treeview ComboBox, similar to the drop-down effect of the custom link of R. A. D. Editor.
    • Full support for images and CSS
      You can easily set the widget's appearance and add images and CSS. You can control the style and status of each node.
    • Automatic SQL binding from ADO. Net Dataset
    • Cross-Frame Support
    • Supports check-box
      R. A. D. Treeview allows you to add the checkbox to each node. You can also easily adjust their style. During running, you can use dedicatedProgramTo obtain the selected set.
    • Dynamic Add/delete/disable node interface
    • You can add multiple instances on a single page.
    • Nodes can be expanded and collapsed.
    • On the submit page, save the position of the scroll bar
    • This function allows Treeview to display the last node position after data is submitted.

Instance analysis:

1. instance Diagram

Note: When the subnode is selected, the node becomes empty. The user can see at a glance that the node is partially selected. It is user-friendly. Page also

It is beautiful and brings visual impact to people.

2. In HTMLCodeJoin

<Asp: scriptmanager id = "scriptmanager1" runat = "server"> </ASP: scriptmanager>

Or<Telerik: radscriptmanagerId = "radscriptmanager1" runat = "server"></Telerik: radscriptmanager>

3,Drag ControlRadtreeview ControlTo HTML page

<Telerik:RadtreeviewRunat = "server" id = "rtvmenu" checkboxes = "true" checkchildnodes = "true"
Tristatecheckboxes = "true">
</Telerik:Radtreeview>

4. Background code

Recursively binding control data is not described here ......

Note:: This control not only provides the above functions, but also facilitates dynamic loading,

When a node is clicked, its subnodes are dynamically loaded, as shown in figureRed boxEffect.

Code:

<Telerik: radtreeviewId = "radtreeview1" runat = "server" Height = "300px" width = "100%" onnodeexpand = "radtreeview1_nodeexpand"/>

Event:

 Protected VoidRadtreeviewinclunodeexpand (Object sender, radtreenodeeventargs E)
{
Populatenodeondemand(E, treenodeexpandmode. serversidecallback );
}

 

Private Static VoidPopulatenodeondemand (radtreenodeeventargs E, treenodeexpandmode expandmode)
{
Datatable DATA = getchildnodes (E. node. value );

Foreach (Datarow row In Data. Rows)
{
Radtreenode node = New Radtreenode ();
Node. Text = row ["title"]. tostring ();
Node. value = row ["categoryid"]. tostring ();
If (Convert. toint32 (row ["childrencount"])> 0)
{
Node. expandmode = expandmode;
}
E. node. nodes. Add (node );
}

E. node. Expanded =True;
}

Well, the above is what I currently useRadtreeviewThe common technical points of the control, detailed also need to slowly explore in the Process of use, but also sincerely hope you and me

Learn and explore the true use of Microsoft-related controls.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.