Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by lina on Sep 10, 2008 15:52
open dhtmlx forum
gris multilineselection limitaion

hi
thanks very much for all your help.
and now i have an issue in my multiselect grid that when i select like 100 or more from my grid and trying to do some database work for it it goes too slow so i decided that i need to put limit on how many rows they can select let's say 20 ,
but i couldn't find this ability to do that.

so i change my way and i added an avent that count the selected rows and when it exceeds the imit it should deselect that row
but i couldn't find this method also,so can you help please ,it is urgent,
thanks
Answer posted by Support on Sep 11, 2008 02:40
>>they can select let's say 20 ,
var flag = false;
mygrid.attachEvent("onSelectStateChanged",function(ids){
   if (flag) return;
   flag = true;
 
   ids = ids.split(",");
   if (ids.length > 20 ) {
       mygrid.clearSelection();
       for (var i=0; i<20; i++)
          mygrid.selectRowById(ids[i],true);
   }

  flag = false;
});

      mygrid.unsele
})

>>but i couldn't find this method also,so can you help please ,it is urgent,
There is no method to deselect specific rows, but it possible to clear all selection and select necessary rows only, as in sample above
Answer posted by lina on Sep 11, 2008 09:04
thank you ,that 's really helped me