on 07-08-2014 11:14 AM
Hi, I'm trying to put a scroll bar in a sap.m.Table or sap.m.Panel. I tried with sap.m.ScrollContainer and inside of this the Table, but the scroll bar is never showed.
how can i do that?
Thanks,
Hi Jose,
Add table as content to the scroll container. Make sure that the contents of the table is greater than the scroll container.
Refer this link
Regards,
Jeffin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you pls paste your code here.
Also try to set height and width 100% for scrollcontainer.
Regards,
kk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is de code //Product Panel var pnlScrollProduct = new sap.m.ScrollContainer({horizontal:true}); var pnlProduct = new sap.m.Panel("idProductPanel"); var searchBar=new sap.m.Toolbar("searchbar", { content:[ new sap.m.SearchField("searchfield", { placeholder: "Search a product", search: [oController.onSearch, oController] }), new sap.m.Button("cart", { icon: "sap-icon://cart" }) ] }); var productTable = new sap.m.Table(this.createId("orderItems"), { visible: false, headerToolbar : new sap.m.Toolbar({ content : [ new sap.m.Label({ text : "Order Items" })] }) }); pnlScrollProduct.addContent(productTable); pnlProduct.addContent(searchBar); pnlProduct.addContent(pnlScrollProduct); Page.addContent(pnlProduct);
Hi Jose,
You have placed content in wrong place holder.
Please place your content in this hierarchy.
Scroll Container---> Inside Scroll Container : Panel ---> Inside Panel : Search, Table
please check the link JS BIN
Regards,
KK
I tried with this place holder but the scroll bar is never showed. pnlProduct.addContent(searchBar); pnlProduct.addContent(productTable); pnlProduct.addContent(btnDisplayOrder); pnlScrollProduct.addContent(pnlProduct); With the the Other place holder and setting height on the scrollcontainer the scrollbar is showed but is not a good solution for me. pnlScrollProduct.addContent(productTable); pnlProduct.addContent(searchBar); pnlProduct.addContent(pnlScrollProduct);
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.