dynamic column dropdown binding

Posted by: bemes9226 on 16 November 2020, 9:30 pm EST

  • Posted 16 November 2020, 9:30 pm EST

    1)in grid i having 3 dropdown cols, i need to bind based on condition .
    when i tried below code it is applied all cols as dropdown.but i want specified cols only using datamap.

    <wj-flex-grid-column *ngFor="let col of columns" [header]="col" [binding]="col"
  • Marked as Answer

    Replied 17 November 2020, 9:02 pm EST


    You may use the conditional operator to assign the data map conditionally. Please refer to the following code snippet and the sample demonstrating the same:
    *ngFor="let col of columns"
    [dataMap]="col == 'country' ? countries : null"


Need extra support?

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

Learn More

Forum Channels