Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
270
Additional Rows While XAMGrid Export to Excel
posted

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.

Parents
No Data
Reply
  • 17475
    Verified Answer
    Offline posted

    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.

    XamDataGridExcelExport.zip
Children