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

Binding Displayed Rows when filtering


Is there a way to get or bind the displayed items when the grid is filtered (using the built-in filter feature)?

I want to be able to print the grid with only the displayed items and not the whole source collection but also don't want to use the built-in print.

Thanks in advance.

3 Replies

GM Gobikrishnan Murugesan Syncfusion Team September 5, 2016 05:20 AM UTC

Hi David, 
Thank you for contact Syncfusion support. 
Query 1: 
 You can get the datagrid view items by using View.Records. Please find the code snippet below, 
//To get view records 
var viewRecords = this.dataGrid.View.Records; 
Query 2: 
Bydefault our SfDataGrid Print Manager prints records which is in view only. You can get the Print document using below the code snippet, 
var printDocument = this.dataGrid.GetPrintDocument(); 
var printDialog = new PrintDialog(); 
if ((bool)printDialog.ShowDialog()) 
    printDialog.PrintDocument(printDocument.DocumentPaginator, "Printing"); 
Please let us know if you have any query. 

DG David García September 5, 2016 10:30 AM UTC

Thanks so much for the reply.

Very helpfull for my purposes.

JG Jai Ganesh S Syncfusion Team September 6, 2016 04:23 AM UTC

Hi David, 
Thank you for the update. 
Please let us know if you need further assistance on this. 
Jai Ganesh S 

Live Chat Icon For mobile
Up arrow icon