cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to customize the column list in the table settings? (fiori elements)

alina_be76
Product and Topic Expert
Product and Topic Expert
0 Kudos
1,021

I have a fiori elements app where I created a list report. This has a table with columns. In the settings of the table I can choose which additional columns I want to be displayed or which columns i want to hide. How can i customize this column list. 

 

My goal is to delete some columns of that column list in the settings, because the user should not be able to choose them.

 

Accepted Solutions (1)

Accepted Solutions (1)

Edrilan_Berisha
Product and Topic Expert
Product and Topic Expert

Hi,

 

either you do it via the annotation mentioned already @ui.hidden or you have a breakout in the frontend coding.

You get the SmartTable where you want to disable certain columns and you call the setIgnoredFields method:

 

 

var oSmartTable = this.getView().byId("<table_id>");
				oSmartTable.setIgnoredFields("<ColumnName>,<ColumnName2>,...");

 

 

More information here: https://sapui5.hana.ondemand.com/#/api/sap.ui.comp.smarttable.SmartTable%23methods/setIgnoredFields

 

Best,

Edrilan Berisha

SAP S/4HANA Cloud Financials Development

Answers (1)

Answers (1)

MioYasutake
SAP Champion
SAP Champion
0 Kudos

@alina_be76 

How about setting the UI.hidden: true annotation for the fields you do not want to expose to the user?

alina_be76
Product and Topic Expert
Product and Topic Expert
0 Kudos
This solves so that the columns cannot be selected but they are still seen in the settings for 'Sort' and for 'Group'.