cancel
Showing results for 
Search instead for 
Did you mean: 

sap ui5 table deselection issue

Former Member
0 Kudos

Hi  experts

im facing an issue

in sap ui table

i have to select a max number of rows :  that is 19 rows ,

after that is done i have to disable select of any further rows ,

but along with that i have to enable deselect the already selected rows ,

which is not happening as of now

here is my code

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

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

  // selectionBehavior: sap.ui.table.SelectionBehavior.RowSelector,

    setFixedRowCount:18,

  //navigationMode : sap.ui.table.NavigationMode.ScrollBar,

  visibleRowCount : 60,

  rowSelectionChange: function(e) {

  ////////////////////////////akshay

       var indices = e.getParameter('rowIndices');

       for (var i = 0; i < indices.length; i++) {

   

   

   

         var idx = indices[i];

         if (oTable.isIndexSelected(idx)) {

    /////////////////////////for current and previous row  

           var cxt = oTable.getContextByIndex(idx);

             

           var arr = [];

       

           arr =  oTable.getSelectedIndices();

       

       

        var selectedrowcount  = arr.length;

        var ra = parseInt(selectedrowcount);

         if((ra > 19) )

            {

      //  overlay_test.open();

          oTable.mProperties.selectionMode = "None"

   

        }

   

   

       ////////////////////////for row count and popup   

       

         }

       }

  /////////////////////////////akshay

  }

  }

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member182862
Active Contributor
0 Kudos

Hi Akshey

Can you spend some more time to construct your questions again? At least to me, I cannot understand what your questions are.

What need to be selected and what need to be deselected?

Thanks

-D