Posted 16 July 2019, 11:34 am EST
Hi Team,
We are using licensed version of wijmo flex grid for our application and we are having this requirement. So by using this link: https://www.grapecity.com/forums/wijmo/how-to-add-wijmo-combo-box: I can’t achieve the full solution because I am binding the data dynamically in my FlexGrid and user has the choice to add as many as number of rows by double click on the cell. (so I have to use cellType as ‘CellEdit’ in this case). So when the user first double-click inside a cell to put it in edit mode, I can’t find id to other combo-box and hence it unable to set the itemsSource property of this control. I am posting my code here please let me know if you have any solution for this. Thanks in advance.
<wj-flex-grid #flex [itemsSource]="data" [allowAddNew]="true" [allowDelete]="true"
(keydown)="onFlexKeydown(flex,$event)">
<wj-flex-grid-filter #filter></wj-flex-grid-filter>
<wj-flex-grid-column [binding]="'exposureType'" [header]="'Exposure Type'" [width]="'*'">
<ng-template wjFlexGridCellTemplate [cellType]="'Cell'" let-cell="cell" let-item="item">
<wj-combo-box id="exposureTypeCombo{{cell.row.index}}" [itemsSource]="exposures"
[displayMemberPath]="'exposureType'" [(selectedValue)]="cell.item.exposureType"
[selectedValuePath]="'exposureType'" [(text)]="cell.item.exposureType" [isRequired]="false"
[isEditable]="false" (selectedIndexChanged)="onSelectedIndexChanged(cell, cell.item.exposureType)">
</wj-combo-box>
</ng-template>
</wj-flex-grid-column>
<wj-flex-grid-column [binding]="'exposureName'" [header]="'Exposure Name'" [width]="'*'">
<ng-template wjFlexGridCellTemplate [cellType]="'Cell'" let-cell="cell" let-item="item">
<wj-combo-box id="exposureNameCombo{{cell.row.index}}" [itemsSource]="exposureNames"
[displayMemberPath]="'exposureName'" [(selectedValue)]="cell.item.exposureNameID"
[selectedValuePath]="'exposureNameID'" [(text)]="cell.item.exposureName" [isRequired]="false"
[isEditable]="false" (selectedIndexChanged)="onSelectedIndexChanged(cell, cell.item.exposureName)">
</wj-combo-box>
</ng-template>
</wj-flex-grid-column>
<wj-flex-grid-column [header]="'Exposure Value'" [binding]="'exposureValue'" [width]="'*'"></wj-flex-grid-column>
</wj-combo-box>
</ng-template>
</wj-flex-grid>