kendo dropdownlist template example

kendo dropdownlist template example

Hello everyone, I am going to share the customize items template and its headerTemplate for appearance of data items in kendo ui dropdown list. i.e.

$(function () {
    $("#customers").kendoDropDownList({
        dataTextField: "Name",
        dataValueField: "ID",
        dataSource: {
            transport: {
                read: {
                    dataType: "json",
                    url: "/api/customers/GetCustomers"
                }
            }
        },
        headerTemplate: '<div class="dropdown-header k-widget k-header">' + '<span>Contacts</span>' + '</div>',
        template'<span class="k-state-default">"<h3>#: ID #</h3>  - <h3>#: Name #</h3></span>'
    });

    var customer = $("#customers").data("kendoDropDownList");
    if (customer != undefined) {
        //TODO: you custom logic..
    }
});



ANIL SINGH

Hey! I'm Anil Singh. I author this blog. I'm Active Blogger, Programmer. I love learning new technologies, programming, blogging and participating the forum discussions more...
My Blogs - http://www.code-sample.com and http://www.code-sample.xyz
My Books - Google Amazon and Flipkart Book Store!

You Might Also Like
Post a Comment
www.code-sample.com/. Powered by Blogger.