Search code examples
sapui5cds

SAPUI5 SmartTable (sap.m.Table) hiding column


is there any way to hide a column from responsive table connected to OData from the user. I do not have in mind now setVisible(false) because the user can chose the column from the settings button. So - is there a way to set the columns to be selected in the settings or hide it permanently (remove from metadata ?). I tried also with the annotations in CDS View @UI.hide but this does not work, unfortunately.


Solution

  • The param ignoreFromPersonalization allows to decide whether the user is able to select and see the column in the table (in below example column1 and column2 will not be selectable in the personalization dialog).

        <smartTable:SmartTable
        id="tblOverview"
        (...)
        ignoreFromPersonalisation="column1,column2">            
    

    Hope it helps for those who had, have, will have this issue/request.