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

ExportToExcel DisplayMember ComboBox

Dear Support-Team,

I am using the syncfusion:GridDataControl with a GridDataVisibleColumn(CellTypeEnum="ComboBox", DisplayMember and ValueMember are different).

When I am trying to use the ExportToExcel()-Method, in Excel the cells of the ComboBox-column are empty inside the WPF-Grid the right values are displayed.

How can I export the right values to Excel?

Regards

Bernhard Korn

Consultant


Attachment: ExportToExcel_DisplayMember_ComboBox_5a1f5ed8.zip

3 Replies

AA Arulraj A Syncfusion Team February 13, 2019 11:56 AM UTC

Hi Bernhard, 

Thanks for using Syncfusion product. 

We are able to export the combobox cell type ValueMember values without any problem. We have prepared a sample and that can be found in the following link. Let us know whether the sample differs from your code settings, so that we can check on that scenario. 


 

Regards,  
Arulraj A  



BK Bernhard Korn February 14, 2019 10:03 AM UTC

Thanks for the answer and the sample-solution. The sample works fine, but in my application I can´t use a  static Resource for the ComboBox-ItemsSource-Property, I must bind it to an ObservableCollection provided by the  ViewModel of the DataContext.

Because the ComboBox-ItemsSource-Property is not bindable, I decided to create my own GridDataVisibleColumn, the BindableGridDataComboBoxVisibleColumn, that works fine, until exporting the values to Excel.

Regards

Bernhard Korn

Consultant


Attachment: ExportToExcel_DisplayMember_ComboBox2_a174c496.zip


SJ Sathiyathanam Jeyakumar Syncfusion Team February 16, 2019 06:58 AM UTC

Hi Bernhard, 
 
Thanks for your update. 
 
We are able to reproduce the reported “Excel export is not working properly when we used the binding for ComboBox column“ issue with the given application. We have forwarded this issue to our developer for further analysis. We will you with more details on Feb 19, 2019. 
 
Regards, 
Sathiyathanam 


Loader.
Live Chat Icon For mobile
Up arrow icon