将kendo-ComboBox(一个kendo-grid-column)的值传递给Angular / Typescript

时间:2018-06-15 05:49:11

标签: angular kendo-grid kendo-combobox

My html:
//to display the car's parts list

<kendo-grid [data]="carPartsList>
 <kendo-grid-column field="carParts" title="Car Parts">
  <ng-template kendoGridEditTemplate
                     let-dataItem="dataItem"
                     let-column="column"`enter code here`
                     let-formGroup="formGroup">
            <kendo-combobox [data]="partsList" 
                            [valuePrimitive]="true" 
                            textField="displayValue"
                            valueField="itemValue"
                            (valueChange)="valueChange($event)"
                            (selectionChange)="selectionChange($event)">
            </kendo-combobox>
  </ng-template>
  </kendo-grid-column>

  <kendo-grid-column field="partsName" title="Part Name">
  </kendo-grid-column>

<kendo-grid>

My carcomponents.ts (I am not sure how to get the dataItem just by clicking the combobox.

public valueChange(value: any): void {
    console.log('valueChange', value);
}


public selectionChange(value): void {
    console.log(value);
}

问题是:如何将组合框的textField值传递给partsName?整个汽车零件显示在Kend-Grid中,如上图所示为Kend-grid-columns 非常感谢任何帮助

0 个答案:

没有答案