multiple columns - Kendo DropDownList Template with Blank Item -



multiple columns - Kendo DropDownList Template with Blank Item -

i trying utilize kendo dropdownlist , provide blank item @ top of list, utilize template provide multiple columns.

var tickettype = $("#tickettype").kendodropdownlist ({ datatextfield: "tickettypename", datavaluefield: "tickettypeid", optionlabel: " ", //this should add together blank item, errors out instead. datasource: { serverfiltering: true, type: "jsonp", transport: { read: { url: "../service/incidentmanagement.asmx/gettickettypelist", contenttype: "application/json; charset=utf-8", type: "post" } }, schema: { data: "d" } }, template: "<div><span>${tickettypename}</span><span>${tickettypedescription}</span></div>" }).data("kendodropdownlist");

the above produces

uncaught referenceerror: tickettypedescription not defined

if not have optionlabel specified below dropdown works fine (without empty item).

if have optionlabel specified , remove template alternative works fine (without multiple columns).

is there way can check see if undefined within template? along lines of:

<span>${tickettypedescription} !== undefined ? ${tickettypedescription} : '' </span>

as per response telerik:

the problem comes fact optionlabel not know other properties of info object. need set values, empty ones, in order work correctly.

so, optionlabel needs specified follows:

optionlabel: { tickettypename: " ", tickettypeid: "", tickettypedescription: "" }

kendo-ui multiple-columns kendo-dropdown

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -