While I have successfully created a simple project using the table object and the function onAfterRendering, I realized that just implementing the onAfterRendering function changes the appearance and disables some functions of the table object. The header bees misaligned with the columns, the left row selectors are bunched up and the scrollbar does not work.
I have seen this happen on any table object that I have tried. As an example, I took SAP's Fixed Columns Example from the SDK, added the onAfterRendering function with no contents and see the problem. I changed the column width to 50px or 100px which causes the problem to be more obvious.
I'm implementing the function following the placeAt statement. I'm using Eclipse Luna with SAPUI5 1.24.4.
//Bring the table onto the UI
oTable2.placeAt("sample2");
oTable2.onAfterRendering = function(){
};
While I have successfully created a simple project using the table object and the function onAfterRendering, I realized that just implementing the onAfterRendering function changes the appearance and disables some functions of the table object. The header bees misaligned with the columns, the left row selectors are bunched up and the scrollbar does not work.
I have seen this happen on any table object that I have tried. As an example, I took SAP's Fixed Columns Example from the SDK, added the onAfterRendering function with no contents and see the problem. I changed the column width to 50px or 100px which causes the problem to be more obvious.
I'm implementing the function following the placeAt statement. I'm using Eclipse Luna with SAPUI5 1.24.4.
//Bring the table onto the UI
oTable2.placeAt("sample2");
oTable2.onAfterRendering = function(){
};
Share
Improve this question
edited Feb 4, 2015 at 11:33
Manuel Richarz
1,92613 silver badges28 bronze badges
asked Feb 4, 2015 at 3:46
Darrel FrittsDarrel Fritts
111 gold badge1 silver badge2 bronze badges
1 Answer
Reset to default 15You should use the addEventDelegate method to register such functions.
oTable.addEventDelegate({
onAfterRendering: function() {
// ...
}
}, this);
In your way you are overwriting the plete onAfterRendering of the control itself.