on 10-04-2016 3:21 PM
Hi,
I am using SAP UI5 1.28 and the sap.m.Table control to display the details of a search pattern.
I need to dynamically show/hide few columns based on various conditions and this can't be done with simple expression binding for the column attribute.
I have a complex search screen and based on the selection criteria, I need to show/hide the column through JavaScript APIs.
I have the table with id "itemTable" and the column id as "column1".
Please let me know the APIs/sample code to hide the above column.
Thanks,
Hi Urmila,
you can add one more property in your existing view model on init and based on condition just set that property to true/false, check below link:
Regards,
Akhilesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
bind visible to model attribute, after you done the complex calculation, you set true/false to that model attribute
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
probably I missed something, but sap.m.column has method setVisible and getVisible, can this be an option? Like in this jsfiddle:
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.