We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid multiselect - method selectRows

Thread ID:

Created:

Updated:

Platform:

Replies:

119799 Aug 3,2015 09:10 AM UTC Sep 10,2015 06:05 AM UTC JavaScript 3
loading
Tags: ejGrid
Stefano Enrico
Asked On August 3, 2015 09:10 AM UTC

Hi,

how to select noncontiguous rows using method selectRows in a multiselect grid? For example, row 1,3,5?
Thanks
Ragards
Stefano

Isuriya Rajan [Syncfusion]
Replied On August 4, 2015 03:27 PM UTC

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



Stefano Enrico
Replied On September 9, 2015 11:56 AM UTC

Hi Isuriya,

thanks for the solution, but there is no api which pass an array of indexes? It would be very useful

obj.selectRows([1,3,5,7]);

Regards
Stefano

Prasanna Kumar Viswanathan [Syncfusion]
Replied On September 10, 2015 06:05 AM UTC

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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;