Tree-shaped drop-down box for Mini-treeselect

Source: Internet
Author: User

the pursuit of efficiency, direct access to the subject bar ... ..

Effect:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6F/6F/wKioL1WcsmzgJshwAABQgMEGEMc933.jpg "title=" Jfbn09pozrqcbrl8[32s (ti.png "alt=" Wkiol1wcsmzgjshwaabqgmegemc933.jpg "/>


Front Code

<linkhref= ". /.. /_frontend/3rd/miniui/miniui.css "rel=" stylesheet "/>

<scriptsrc= ". /.. /_frontend/3rd/miniui/miniui.js "></script>

<input class= "mini-treeselect" id= "ipajly" runat= "Server" url= "data/ajaxservice.ashx? method= Geteventsource&userid= "textfield=" "valuefield=" "parentfield=" "Expand style=" width:100%; "/>

Brief analysis:

Textfield : Display text values

Valuefield : ID

ParentField : Parent class encoding

Expand Expand all By default

Background code

need to add Newtonsoft.Json.dll References

add a generic handler ajaxservice.ashx

Public Voidprocessrequest (HttpContext context)

{

Context. Response.ContentType = "Text/plain";

String method =context. Request.getrequestvaluebyparam ("method");

if (method. ToLower () = = "Geteventsource". ToLower ())

{

Geteventsource (context);

}

}

Public Voidgeteventsource (HttpContext context)

{

DataTable dt = new DataTable ();// get the data you need to bind

context. Response.Write (Newtonsoft.Json.JsonConvert.SerializeObject (DT));// serialization

}

Mini-treeselect Specific Attribute method description :


Reference URL: Http://www.miniui.com/docs/api/index.html#ui=treeselect


Tree-shaped drop-down box for Mini-treeselect

Related Article

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.