Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9052

sap ui5 table conditional row selection

$
0
0

Hi experts

 

I am trying to enable row selection only when my max selected row count = 19

 

my table is as follows

 

 

var oTable = new sap.ui.table.Table("tableid", {

    selectionMode :  sap.ui.table.SelectionMode.MultiToggle,

 

  visibleRowCount : 60,

 

}

 

 

 

 

 

but the attach row selection takes place even after that ,

 

please help

 

here selection mode is a global variable

 

 

if(selectionmode == true )

    {

    oTable.attachRowSelectionChange(function(){

    

       var arr=[];

      

      

       arr =  oTable.getSelectedIndices();

      

    

      

        var selectedrowcount  = arr.length;

      

        var rat = parseInt(selectedrowcount);

       if((selectedrowcount)==19)

         {  overlay_test.open();

    selectionmode = false;

     

   

         }   

  

  });

 

 

    }


Viewing all articles
Browse latest Browse all 9052

Trending Articles