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
515
ExcelExporter
posted

Hello,

I'm using XamDataGrid 11.2 on my solution.

This is a big solution with a multiple projects and on every project I have several XamDataGrids.

I want to create one general ExportToExcel method using the ExcelCellFormatSettings, ExcelGroupFormatSettings and the ExcelLabelFormatSettings to edit the visual appearance of the excel tables.

 

My problem is that I want to define the visual appearance only once in my solution and not in every Window/UserControl separately.

 

I tried to create a style for the XamDataGrid in my ResourceDictionary, but I'm getting this error massage:

" 'Cannot create unknown type '{http://infragistics.com/ExcelExporter}DataPresenterExcelExporter'.'"

 

Even if I will be able to create this style, every xamDataGrid that overwrite the FieldSettings will "lose" the visual appearance setting that sets in the style.

 

Is there a good solution for this? Maybe I'm using this wrong…

 

  • 138253
    Offline posted

    Hello Roy,

     

    It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking into your post and I created a sample project for you with the functionality you want. Basically I added a class library to the solution, where I created a FiledSettings instance, which can be used in all projects. If you want to set different settings to the Fields, you can set them directly to the Field, not the XamDataGrid.

     

    Feel free to write me if you have further questions.

    XamDataGridExportSettings.zip