Skip to Content
0
Former Member
Jul 05, 2015 at 03:24 AM

sap ui5 table conditional row selection

181 Views

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;

}

});

}