Skip to Content
Aug 27, 2020 at 06:30 AM

Smart Table width issue

152 Views Last edit Aug 27, 2020 at 06:34 AM 3 rev


I am facing one issue in smart table using sapui5 where I have used few property in the smart table. Please find below the screenshot of the code.


and so on till last table columns i missed to define columns which I don't required in default screen user can select it from the table setting if he/she want to add those columns in the table so the column index sequence you will not find proper. and below is the last column screen shot


1. when we unchecked or simply click on the OK button which is in the table's setting icon where all columns are listed. then unfortunately this onBeforeRebindTable() doesn't work but if we checked the columns and click on OK button then after this method trigger and set the width for all the columns what ever we define.

2. i found that in response we got only 26 columns entry(what columns we define in ui:table and in initiallyvisibleFields property) not all the columns which are in the entity. so that is also the reason we won't able to define the width of those fields which are not actually in the ui:table.


onBeforeRebindTable: function (oEvent)


var oBindingParams = oEvent.getParameter("bindingParams");

var smartFilterBar = this.getView().byId("smartFilterBar");

var fieldBanfn = smartFilterBar.getControlByKey("R_Banfn");

var fieldUser = smartFilterBar.getControlByKey("R_User");

var fieldDate = smartFilterBar.getControlByKey("R_Date");

var tokenFilter1 = fieldBanfn.getTokens();

var tokenFilter2 = fieldUser.getTokens();

var tokenFilter3 = fieldDate.getTokens();

for (var i = 0; i < oEvent.getSource().getTable().getColumns().length; i++) {

if (i === 25) {


} else {






if (tokenFilter1.length > 0 || tokenFilter2.length > 0 || tokenFilter3.length > 0) { this.getView().byId("messageStripId").setVisible(false);


} else if (!this._isStripVisible) {

this._isStripVisible = true; oBindingParams.filters = [];

} else {

oBindingParams.filters = [];



} }

Please do some needful. Your help will really be appreciated !!

Thanks & Regards,

Kritika Sharma


1111.png (72.2 kB)
1111.png (72.2 kB)