Kendo ComboBox value template?

Viewed 1787

Using the Kendo ComboBox, I've created a picker for some data coming from a webservice. The HTML code looks like this:

<kendo-combobox #myPicker 
    [data]="myData" 
    [valueField]="'ID'"
    [textField]="'Number'" 
    [filterable]="true"
    [allowCustom]="false"
    (valueChange)="onChange($event)">
    <ng-template kendoComboBoxItemTemplate let-dataItem>
        {{dataItem.Number}} - {{dataItem.Subject}}
    </ng-template>
</kendo-combobox>

The item template works perfectly, it is displayed exactly as needed. What I would like to do now, is to also format the selected value (the one shown in the textfield itself). Right now, it just picks the field provided in [textField], which in this case is Number.

Is there any way to format the selected value? I checked the documentation, there seems to be no template for that. I also tried using the [value] property and setting a custom string there, but that breaks the combobox as it is expecting an object.

0 Answers
Related