Wijmo FlexGrid - Create Grid column which has ng-template programatically

Posted by: charles on 28 December 2017, 8:06 am EST

    • Post Options:
    • Link

    Posted 28 December 2017, 8:06 am EST

    Hi,

    Is there a way to create bellow grid column that is using ng-template programatically?

          <wj-flex-grid-column [header]="'Code'" [binding]="'CODE'">  
           <ng-template wjFlexGridCellTemplate [cellType]="'CellEdit'" let-cell="cell">
                  <wj-auto-complete #comboBox
                                    [itemsSourceFunction]="getCodes"
                                    [isEditable]="false"
                                    [(selectedValue)]="cell.value"
                                    [isRequired]="false"
                                    [showDropDownButton]="true"
                                    [autoExpandSelection]="true"
                                    [displayMemberPath]="'CODE'"
                                    [selectedValuePath]="'CODE'"
                                    [headerPath]="'CODE'"
                                    (initialized)="init(comboBox,$event)"
                                    (selectedIndexChanged)="codeCloseUp($event)"
                                    >
                    >
                  </wj-auto-complete>
                </ng-template>
          </wj-flex-grid-column>
    

    Many thanks for your help.

    Regards,

    Charles

  • Posted 28 December 2017, 9:57 pm EST

    Hi Charles,

    The cellTempalte cannot be applied using Typescript. WjFlexGridCellTemplate is directive for Angular Js/Angular 2.

    If you would like to add CustomEditor pro grammatically, you need to use formatItem for the same. Please refer to the attached sample for the same.

    ~Manish

    FlexGrid_customEditor_TS.zip

Need extra support?

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

Learn More

Forum Channels