Remove entire column data

Posted by: deepakdaash on 2 May 2018, 4:11 am EST

    • Post Options:
    • Link

    Posted 2 May 2018, 4:11 am EST

    Is it possible to remove entire column data from the grid data source ? I have a JSON data source which is a collection of objects. Each object has many properties of which i would only display 4 column. When i try to export this data back to server for saving i am also getting these un necessary data.

    P.s I am forming column bindings manually based on other set programmatically.

    Example:

    datasource = ‘[{Id:1,CustNo:“12”,CustomerAddr:“some place”},{Id:1,CustNo:“13”,CustomerAddr:“some place2”}]’

    columns are formed based on another array [“CustNo”,“CustomerAddr”]

    So Id is not shown to user at all (Id column is also not formed) but when i am extracting the data from grid.editableCollectionView.items it contains Id data which i would not like to have.

  • Posted 2 May 2018, 10:05 pm EST

    Hi Deepak,

    The Data source properties can not be deleted from FlexGrid. These can be modified only depending how you are binding to FlexGrid or how you perform editing operation.

    If you would like to retrieve the FlexGrid columns data only, you need to get data by yourself. But, here you need to get the needed records only.

    Please refer to the following demo for reference:

    https://stackblitz.com/edit/angular-zx6zab?file=app%2Fapp.component.ts

    ~Manish

Need extra support?

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

Learn More

Forum Channels