on 2018 Sep 20 7:50 AM
hi,anyone knows the demo for show or hide the field for list?exmaple like(choose layout in AVL).I think there is a parameter to control it
Request clarification before answering.
Hi huang,
Try to get columns and respective fields by Id and then show on as per requirement.
<Table id="idProductsTable" items="{ path: '/nameofentityset' }">
<columns>
<Column id="column1">
<Label text="MATNR" />
</Column>
<Column id="column2">
<Label text="MAKTX" />
</Column>
<columns>
<ColumnListItem>
<Text id="text1" text="{matnr}"/>
<Text id="text2" text="{maktx}"/>
</ColumnListItem>
</Table>
this.getView().byId("column1").setVisible(false);
this.getView().byId("text1").setVisible(false);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Like Jun mentioned you can use Smart table. Here are below ways to do it.
1. User variant management to control the table columns => If you use smart table it is way easier to do it as smart table and smart variant management has very tight integration
2. Use list report template which automatically provides variant management and a smart table for you,
3. If you dont want to use variant management and control it manually by writting code(which i wont recommend) then use the binding to visible property of table columns and hide them based on ur scenario logic.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if you use smart table, it is all done by sap. you don't have to do anything.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
30 | |
10 | |
8 | |
8 | |
7 | |
7 | |
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.