简体   繁体   中英

SAPUI5 SmartTable dynamically ignore Columns

Is there a way to use the ignoredFields property of a sap.ui.comp.smarttable.SmartTable to dynamically ignore columns? The value of ignoredFields should be changed while the app is running. Is the usage of ignoredFields the right way to do this or is there a better way? I already tried calling the setIgnoredFields() function of my SmartTable, but it didn't make any effect on my SmartTable, except when I called it in the onInit() function of the respective controller, which of course would defy the dynamic approach i'm looking after.

The only way I found to dinamically hide columns in a SmartTable is redefying the columns of the internal Table with all the columns I need and then setting the "visible" property of such columns accordingly.

I still wonder if it is the best solution but is the only one working...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM