asp.net mvc - Kendo Multiselect with composite dataTextField -
asp.net mvc - Kendo Multiselect with composite dataTextField -
i'd appreciate if advise on following:
my multiselect:
@html.kendo().multiselectfor(model => model.payment_method).bindto(paymentmethods).datatextfield("title").datavaluefield("code")
the datasource looks this:
code title 1 abc 2 def
is possible have composite datatextfield
, like: 1 - abc, 2 - def, etc.
, i.e "code" - "title"
?
i know create select list , define format of textfield, maybe there way? thanks!
you specify template display item (you want take text field out then):
@html.kendo().multiselectfor(model => model.payment_method) .bindto(paymentmethods) //.datatextfield("title") .datavaluefield("code") .itemtemplate("#= code# #=' - '# #= title#")
here's link itemtemplate
method , link general template
methods.
asp.net-mvc kendo-ui kendo-asp.net-mvc kendo-multiselect
Comments
Post a Comment