on 06-08-2016 12:24 PM
Dear all,
i have a problem that i need to use a multi-header grid table.
When i use setHeaderSpan in javascript it works fine, however when i use headerSpan property of sap.ui.table in the xml view it seem not to work.
Is this a know bug or am i dong something wrong?
Does anyone have an idea how i can extent sap.ui.table.column so i can overcome this issue and set it still in the XML?
I tried also higher version and its not working in XML.
JSBIN with full minimal example code can be found here:
JS Bin - Collaborative JavaScript Debugging
Does not work:
<table:Column id="col2"
hAlign="Center"
headerSpan="[2,1]"
>
<table:multiLabels>
<Label text="Stock" />
<Label text="B2" textAlign="Center" class="tableHeaderWrap"/>
</table:multiLabels>
<table:template>
<Label text="{ShipCity}" />
</table:template>
</table:Column>
<table:Column id="col3" hAlign="Center">
<table:multiLabels>
<Label text="Stock" />
<Label text="B2" textAlign="Center" class="tableHeaderWrap"/>
</table:multiLabels>
<table:template>
<Label text="{ShipName}" />
</table:template>
</table:Column>
Does work:
onInit : function () {
// this will work but in xml doesn't
this.byId("col2").setHeaderSpan([2,1]);
);
Would be nice if anybody could help.
Regards
Alex
Hi Alex,
You can bind headerSpan property to a JSON model
<tb:Column headerSpan="{path:'multiHeaderConfig>/multiheader3'}">
var oMultiHeaderConfig = {
multiheader1:[3,1],
multiheader2:[4,1],
multiheader3:[6,1]
};
this.getView().setModel(new sap.ui.model.json.JSONModel(oMultiHeaderConfig), 'multiHeaderConfig');
Regards,
Dorian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello all,
i debugged it now into the UI5 code. And seems the value in the XML is passed as string.
in 1.28.28 SAPUI5
in /sap/ui/table.js
function Table.prototype._updateColumnHeader
at line 2242ff i can see that the is an jQuery.isArray(vHeaderSpan) which will fail as vHeaderSpan is
" '[2,1]' "
So this statement will from XML always return false.
Can i get a fix? Is there a good way to extend the control?
Best regards
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.