cancel
Showing results for 
Search instead for 
Did you mean: 

Hide Group tab in P13nDialog in SmartTable

former_member306541
Participant

Hello,

I found this nice code snippet within a SmartTable example

<core:View xmlns:core="sap.ui.core" xmlns="sap.m"
...
xmlns:app="http://schemas.sap.com/sapui5/extension/sap.ui.core.CustomData/1">
...
	<smartTable:SmartTable id="LineItemSmartTable" entitySet="LineItemsSet"
		smartFilterId="smartFilterBar" tableType="ResponsiveTable"
		app:p13nDialogSettings="{group:{visible:false}}"
...

app:p13nDialogSettings="{group:{visible:false}}" hides the group tab within the P13nDialog. I wonder, if it is possible to get the same output programmatically by adding custom data within the onInit-method of the controller. I tried this:

this._oSmartTable.data("p13nDialogSettings", {group:{visible:false}});

When calling

this._oSmartTable.data();

Both ways produces the same output:

{
  p13nDialogSettings: {
    group: visible
  }
}

But the second way does not have any effect on the P13nDialog. It still displays the group tab. I would guess, that it is too late to set this data and the P13nDialog has already been initialized. But perhaps somebody knows a way to achieve this?

Kind regards,

Christian.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member351744
Discoverer
0 Kudos

Hello,

There is very simple solution, I managed to hide in controller file the "group" tab of personalization dialog. If you want to hide the tab from the beginning you need to implement the onBeforeRendering function. Please take a look on following piece of code:

onBeforeRendering: function (oEvent) {
var oTable = sap.ui.getCore().byId(
"YBRIM.ybrim_inv_credit_note::sap.suite.ui.generic.template.ListReport.view.ListReport::InvoiceSet--listReport");
oTable._oPersController._oSettingCurrent.group.visible = false;
},

Regards,

Szymon

EkanshCapgemini
Active Contributor
0 Kudos

Hello,

Did you find the answer? I need to hide the columns panel from the p13n dialog when table is in edit mode and setting this custom data from controller doesn't work.

Regards,

Ekansh