BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
Hi Stefano,
We can achieve your requirement by using SelectRow public method.In this method we can pass the index of the row to select.
function btnClick(){ var obj = $("#Grid").data("ejGrid"); obj.clearSelection(); for(i=0;i<obj.model.currentViewData.length;i++) { // will select alternative rows if(i%2==1) obj.selectRows(i); obj.multiSelectCtrlRequest = true; } } |
We have created a sample and the same can be downloaded from the following location:
Sample Link: http://www.syncfusion.com/downloads/support/directtrac/119799/Grid-2128873011.zip
Please refer to the below KnowledgeBase articles for more details.
http://www.syncfusion.com/kb/2979/how-to-select-or-highlight-rows-based-on-data
Please try the above sample and let us know if it helps.
Regards,
Isuriya R
Hi Stefano,
Query: “Passing array of indexes in select rows method”
Currently we do not have support for select rows method, but we have created an improvement task for that. A support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents
Regards,
Prasanna Kumar N.S.V