Hello,
I got a smart table without a variant. And I want to resize the standard fields which come over annotations. I manage the resizing with my own custom fields. But not with the standard ones.
I tried this in the controller - but it doesn't work:
oTable.getColumns().forEach(function (oColumn) {
if (oColumn.sId.includes("Matnr") || oColumn.sId.includes("Aufnr")) {
oColumn.setWidth("30%");
//oTable.autoResizeColumn(oColumn.getIndex());
}
});
I tried this at the afterRendering function and in the data-received Event of the table..
Simply doesn't work at all.
Thanks.
Request clarification before answering.
Hi,
you can get the used table (e.g. sap.m.Table) with
_oSmartTable.getTable().
sap.m.Table has the event updateFinished. Try to modify the columns here.
Sample Code
<smartTable:SmartTable tableType="ResponsiveTable" >
<m:Table updateFinished=".doModifyColumn">
</m:Table>
</smartTable:SmartTable>
doModifyColumn: function(oEvent){
var oTable = oEvent.getSource();
oTable.getColumns().forEach(function (oColumn) {
f (oColumn.sId.includes("Matnr") || oColumn.sId.includes("Aufnr")) {
oColumn.setWidth("30%");
//oTable.autoResizeColumn(oColumn.getIndex());
}
});
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.