on 07-12-2018 9:22 AM
if you are using the tree table control from ui5.. there is no simple select all or even expand all.. you have to go into each level... and expandContext (or select) ... if you are using mvc binding... then you would capture the check/uncheck at the parent.. and set the children level objects to the same value. using a binding expression will be easier than having to get/set values per item
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
It has been more than one year but can you please help with more details.
How can we capture check/uncheck parents ?
Thank you.
Use the below code to make child selected when a parent gets selected.
function addSelectedFlag(aNodes, bSelected) {
jQuery.each(aNodes, function(iIndex, oNode) {
oNode.selected = bSelected;
if (oNode.categories) {
addSelectedFlag(oNode.categories, bSelected);
}
});
}
var aItems = oEvent.getParameter("listItems") || [],
oModel = this.getView().getModel();
jQuery.each(aItems, function(iIndex, oItem) {
var oNode = oItem.getBindingContext().getObject(),
bSelected = oItem.getSelected();
if (oNode.categories) {
addSelectedFlag(oNode.categories, bSelected);
}
});
oModel.refresh();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.