Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

How to make scrollable in table for ui.table liberary

$
0
0

Hi Expert,

 

 

 

I have a dropdownbox, what ever value I'm selecting in the dropdown I'm making that many number of columns in my table(I'm using ui.table ) as visible and remaining columns as scrollable.

 

eg:  I have 6 columns in my table (ui.table) and I selected dropdown value as 2

 

dropdown : 2

 

table:   column1   column2

 

rows1

 

row2

 

row3

 

row4

 

Now I want to show remaining columns as scrollable. How to achieve that?

 

this is the code that I written in my change function of combobox

 

 

var oTable = sap.ui.getCore().byId("idTable");

        var columnCount = parseInt(oControlEvent.getParameter("newValue"));

        var arrColumns = oTable.getColumns();

       

        for(i=0;i<arrColumns.length;i++)

   {
       var __visible = i<columnCount;          // True when it is success
       arrColumns[i].setVisible( __visible );
       }

 

 

Thanks,

Ashok.


Viewing all articles
Browse latest Browse all 6178

Trending Articles