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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ejGrid - Row selection in paging

Thread ID:

Created:

Updated:

Platform:

Replies:

124415 Jun 8,2016 11:25 AM UTC Jun 9,2016 12:11 PM UTC JavaScript 1
loading
Tags: ejGrid
Prashant Prasad
Asked On June 8, 2016 11:25 AM UTC

I want to select first row of each page after clicking on next page or previous page button. I am only able to select first row after grid initialization.

Venkatesh Ayothi Raman [Syncfusion]
Replied On June 9, 2016 12:11 PM UTC

Hi Prashant, 

Thanks for contacting Syncfusion support. 

We are achieved your requirement “Select the first row while paging operation and grid Initialization” using actionComplete event. This event triggers after every Grid success event. We can check the condition of requestType and select the row using selectRows() method in the Grid. 
Please refer to the Sample, code example and Help document, 


Code example: 

<Grid> 
$("#Grid").ejGrid({ 
                // the datasource "window.gridData" is referred from jsondata.min.js 
                dataSource:window.gridData, 
                 
                 allowPaging: true, 
                 
 
              actionComplete:"actionComplete", 
                      
                columns: [ 
 
                      . . .  
 
                ] 
            }); 
        }); 
 
<ActionComplete event> 
function actionComplete(args){ 
 
               
              if(args.requestType == "paging" || args.requestType == "refresh"){ 
 
                  this.selectRows(0); //Select the first row every page operation 
 
              } 



Regards, 
Venkatesh Ayothiraman. 


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

;