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. Image for the cookie policy date
close icon

How can I get selected rows after grouping and filtering?

If I have a grid with data that are not filtered nor grouped, I can retreive the selected row with the script:

<script>
// Create grid object.
var gridObj = $("#Grid").data("ejGrid");
// Gets the filtered or searched records in Grid
gridObj.getFilteredRecords();  
</script>
Suppose I have a grid that loads data grouped by one column. Then I filter the data and select one filtered record. How can I get the Id of the selected filtered record?

Thanks

Claudio





1 Reply

PK Prasanna Kumar Viswanathan Syncfusion Team May 9, 2017 01:36 PM UTC

Hi Claudio, 


 

Thanks for contacting Syncfusion support.  


 

To get the selected record data, use getSelectedRecords method of ejGrid. The getSelectedRecords method will return the selected record details from the Grid.  


 

So, if you need to get the selected record details after grouping and filtering, use getSelectedRecords method of ejGrid. If you need to get the selected rows, use getSelectedRows method of ejGrid.  


 

Refer the below help documents for getSelectedRecords  and getSelectedRows  


 

https://help.syncfusion.com/api/js/ejgrid#methods:getselectedrecords 


 

https://help.syncfusion.com/api/js/ejgrid#methods:getselectedrows 


 

Regards, 

Prasanna Kumar N.S.V 

SIGN IN To post a reply.
Loader.
Live Chat Icon For mobile
Up arrow icon