on 06-01-2017 6:32 AM
Hello Experts,
please, how could I fix a problem in the TreeTable, when it keeps showing "arrows" to expand the next level, even when it is the last one.
I suppose it is due to the metadata in the model, and could work properly if I clear each __metadata. As I'm not sure if it is the best solution for this problem, or if I could have problems latter for cleaning metadatas, would you have another idea?
Follows a part of the code and a print screen. Thank you!
var oFirstTemplate = new sap.m.ObjectIdentifier().bindProperty("text", {
parts: [{
path: "CustomerID"
}, {
path: "OrderID"
}],
formatter: function(CustomerID, OrderID) {
if (OrderID) {
return "";
} else {
return CustomerID;
}
}
});
var oTreeFirstColumn = new sap.ui.table.Column({
label: "CustomerID",
template: oFirstTemplate
// template: "CustomerID"
});
var oTreeSecondColumn = new sap.ui.table.Column({
label: "Name",
template: "ContactName"
});
var oTreeThirdColumn = new sap.ui.table.Column({
label: "Order Id",
template: "OrderID"
});
var oTreeTable = new sap.ui.table.TreeTable("idTreeTable", {
columns: [
oTreeFirstColumn,
oTreeSecondColumn,
oTreeThirdColumn
],
selectionMode: sap.ui.table.SelectionMode.Single,
enableColumnReordering: true,
expandFirstLevel: true
});
oTreeTable.bindRows({
path: "/Customers",
parameters: {
expand: "Orders",
arrayNames:["Orders"],
navigation: {
"Customers": "Orders"
}
}
});
HI Rogerio
The easiest way is to reorganize your data
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would try adding
"DrillState": "leaf"
as per nodes.json in
https://sapui5.hana.ondemand.com/#/sample/sap.ui.table.sample.TreeTable.BasicODataTreeBinding/code
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
probably you don't have other option.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear @Moderators,
would you have some tip or idea about how to solve this problem?
Thanks
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 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.