Posted 14 September 2017, 12:12 pm EST
Hi guys,
I promise I don’t try to stack the more features in the same use case (I could seems I do), but I’ve a nice case for you ![]()
In a grid, I need an autocomplete input item.
As the DataMap doesn’t seems to allow that just by itself, I went for a celltemplate.
That was a bit weird to set up, but smooth enough. (see simplified example below, if that helps).
Basically, I made a cellEdit cellTemplate with an autocomplete, and a cell cellTemplate, with the ID and a Pipe.
… until I tried to use the FlexGridFilter ! Without DataMap, it displayed the ids.
Halas, I had to strip the DataMap away (and making a Pipe instead) because it made its list appears and both were in conflict.
So my question is :
- Is it possible to use a regular DataMap as an autocomplete ?
- Is it possible to use it regularly in a cell template (without a pipe that can’t be handled by the FlexGridFilter) ?
- Is it possible to disable the default interaction behavior of the DataMap ?
- Is it possible to specify use some kind of DataMap with the filtring ?
- Last remark, I noticed that I can’t make the scrollDown trigger out of the DataMap list without the mouse. It would be really interesting.
Thanks again for your help.
<wj-flex-grid-column [header]="'Supplier'" [binding]="'SupplierId'" [dataMap]="dtmSuppliers"> <ng-template wjFlexGridCellTemplate [cellType]="'Cell'" let-cell="cell" let-item="item"> {{item.SupplierId | supplierPipe : cvSuppliers | async}} <div class="wj-elem-dropdown"><span class="wj-glyph-down" (click)="forceDropDown(cell)"></span> </div> </ng-template> <ng-template wjFlexGridCellTemplate [cellType]="'CellEdit'" let-cell="cell"> <wj-auto-complete #suppliersCombo [(selectedValue)]="cell.value" [itemsSource]="cvSuppliers" [displayMemberPath]="'supplierName'" [selectedValuePath]="'supplierId'"> </wj-auto-complete> </ng-template> </wj-flex-grid-column> forceDropDown(cell: any) { this.flexGrid.startEditing(false, cell.row.index, cell.col.index, true); setTimeout(() => { this.suppliersCombo.isDroppedDown = true; }, 250); }
