FlexGrid Odata

Posted by: lic on 7 January 2024, 4:24 am EST

    • Post Options:
    • Link

    Posted 7 January 2024, 4:24 am EST

    Hi. I’m have this type of data from Odata. How can I make a column binding to show values joined with comma “SUPER, EXPRESS”

    
    "WareFormatEntityDetails": {
      "results": [
        {
          "FormatCode": "SUPER"
        },
        {
          "FormatCode": "EXPRESS"
        }
      ]
    }

    <wj-flex-grid-column header="Formats" binding="WareFormatEntityDetails/FormatCode">
  • Posted 7 January 2024, 10:31 pm EST

    Hi,

    You can handle the formatItem event of the flexGrid to modify the text content displayed in the grid cell as per your requirements. You can refer to the following sample for the same - https://stackblitz.com/edit/angular-ivy-3um84l?file=src%2Fapp%2Fapp.component.ts

    Please note that this will only work if your column is ReadOnly. If you want to make the column editable, then you can use the MultiSelect as a custom editor for the column and handle the loadedRows event of the grid to modify the rows dataItem to show data properly.

    You can refer to the following sample for the same - https://stackblitz.com/edit/angular-ivy-vyc4f4?file=src%2Fapp%2Fapp.component.ts

    Please note the, we set the column binding to ‘WareFormatEntityDetails/FormatCode.results’ in the above sample.

    Regards

Need extra support?

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

Learn More

Forum Channels