Angular 2 ng-template via code

Originally Posted 31 August 2017, 9:11 am EST

  • Originally Posted 31 August 2017, 9:11 am EST

    How can achive this behavior via code and not in the html.

    <wj-flex-grid-column [header]="'Sales'" [binding]="'sales'">
    <ng-template wjFlexGridCellTemplate [cellType]="'CellEdit'">
    <wj-input-number [(value)]="cell.value" [step]="1"></wj-input-number>

    I don't have the columns defined in the html. I want to add the CellEdit type but the wjGrid.CellType.CellEdit doesn't exist.
    I want to create an editor for a Date (set a Calendar Picker), a Input Number, and a List.
  • Marked as Answer


    Hi Cesar,
    The template can not be applied to FlexGrid through code. For this, you need to use itemFormatter or formatItem for creating custom editor. For your reference, please refer to the attached demo sample for the same.

    Manish Kumar Gupta
  • Reply

    Thanks for the replay
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels