I have a grid with a Status column
The valid values for the underlying data are A (for Active) and I (for Inactive).
But I want the display value of the cell in the grid to show the more descriptive values: Active and Inactive.
And I want the cell to have a dropdown or select element that allows the user to pick from a list showing Active and Inactive.
This is easily accomplished in the Winforms grid component using a ValueList.
Is this possible in the angular igx-grid?
2nd question - I am having trouble pasting screenshots in the forum when posting a question - the screenshot appears when I paste it in but disappears when I click "POST YOUR QUESTION". Are screenshots allowed to be included in this forum when posted by a user? I see gifs and other graphics that are posted by Infragistics support personnel.
For example, I am pasting a screenshot of my grid here (and I can see it in the timymce editor, but I think it will disappear as soon as I post)
And I am pasting the screenshot as a link here (maybe this will work).
/community/resized-image/__size/320x240/__key/communityserver-discussions-components-files/1043/6404.pastedimage1722453842257v2.png
Hello Walter,
In order to have a dropdown in a cell you can use the ng-template for the igxCellEditor to set an editor for it, where you would need to configure the select values. You would also need to template the IgxCell to display the values as “Active” and “Inactive”. It can be achieved with the following markup:
<igx-column field="Active" header="Active" [editable]="true"> <ng-template igxCell let-cell="cell"> {{ cell.value === 'A' ? 'Active' : 'Inactive' }} </ng-template> <ng-template igxCellEditor let-cell="cell" let-value> <igx-select class="cell-select" [(ngModel)]="cell.editValue" [igxFocus]="true" > <igx-select-item value="A">Active</igx-select-item> <igx-select-item value="I">Inactive</igx-select-item> </igx-select> </ng-template> </igx-column>
I have also prepared a small sample that demonstrates the suggested approach. You can access it here:https://stackblitz.com/edit/bjfbwk?file=src%2Fapp%2Fgrid%2Fgrid-resizing-sample%2Fgrid-resizing-sample.component.html
Regarding adding an image to the forum, you can do this by using the insert option and selecting “Insert Image/Video/File”.
Please let me know if you need any further assistance.
Regards, Ivan Kitanov