Attach table horizontal scroll to parent container (sapui5) -


i have sap.ui.table component wrapped inside sap.ui.layout.verticallayout. thing if table columns re-sized(enlarged) , table horizontal scroll-bar. far good, ,my question is, if there way can place table horizontal scroll-bar on parent container (so on verticallayout component), way user won't required scroll rows way down access horizontal scroll-bar.

i tried set vertical layout component width "auto" , me desired behavior, in case table not expanding 100% of page(it works fine on chrome tho, problem of not going 100% when auto present on ie (ie11 in case)) . basically, need set width of parent 100% table , container expanded right margin of page, if horizontal scroll-bar needed, need displayed on container rather on table.

i out of ideas help,tips ,would great, thanks!

update: added jsfiddle replicates structure of page , issue too. must add problem there only in ie(i use ie11).

in case there other people facing problem, solution found:

1) on wrapper container creation set width 100%, way , table expanded 100% on browsers.

2) attach columnresize function on table this:

columnresize: function(e){     applyscrolloncontainer(); } 

3) on applyscrolloncontainer(), change width of container auto, way table scrollbar placed on container.

sap.ui.getcore().getelementbyid("yourcontaineridhere").setwidth("auto"); 

4) may add check on document.load. if table scroll-bar displayed, again, attach container.

var scrolldisplay = $("#tableidhere .sapuitablehsb").css("display");   if(scrolldisplay === "block"){     sap.ui.getcore().getelementbyid("orders_view_first_table").setwidth("auto"); } else{     sap.ui.getcore().getelementbyid("orders_view_first_table").setwidth("100%"); } 

Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -