Dynamic column dropdown binding

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

    • Post Options:
    • Link

    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”

    [dataMap]=“taxdata”

    >

  • Posted 17 November 2020, 9:02 pm EST

    Hi,

    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:

    <wj-flex-grid-column
        *ngFor="let col of columns"
        [header]="col"
        [binding]="col"
        [dataMap]="col == 'country' ? countries : null"
      ></wj-flex-grid-column>
    

    https://codesandbox.io/s/wijmo-angular-forked-mevlo?file=/src/app/app.component.html

    Regards

    Sharad

Need extra support?

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

Learn More

Forum Channels