On the Screen XAMDataGrid is populated based on various search criteria. While I export XAMDataGrid to Excel, I want to Add additional Search criteria Labels before the actual data appears in the excel sheet.
I cannot go ahead with creating the excel from DataSource as the user may have grouped the records in XAMGrid before choosing to export. If the records are grouped I wish to have the grouped data appear in Excel which is currently happening.
Hello Aniket,
Thank you for your post.
I have been looking into it and I made a simple project reproducing the behavior you are trying to achieve. I handle the ExportStarted event of the DataPresenterExcelExporter and set CurrentRowIndex equals “1” so that the data exported from the XamDataGrid will start at the second row. I add “Searched Criteria” text in the first cell and searchBox.Text in the second cell of the first row in order to give some additional information about the search criteria.
In the attached sample you can choose some search criteria from the combo box and press “Populate Data” button to set the data in the grid. Then you can press “Export” button which will export the data from the grid to excel.
I hope this will help you.
Appreciate efforts Maria.
It works well with one row along with the grouping. How do I add multiple rows?