Export to Excell from GridDataControl

Hi,

I am relatively new to WPF, and I found this great product. I am running through samples and I have problem with excell export from GridDataControl.
I look at the local sample (Grid Data Control -> Excel Export Demo).

My button for export is allways disabled.

Structure of my UI is that I have ChromelessWindow and inside TabControlExt. Items for TabControlExt are loade dinamically and it loads separate UserControls.
That is workink fine.

In User control I have 2 GridDataControl and for each of them I want to set separate export (2 separate buttons)
Button for export is allways disabled.

Only difference from local sample is CommandParameter Binding (I am not using LayoutControl.Grid)

- ChromelessWindow
-- TabControlExt
---- UserControl
------ GridDataControl

1. Is there a nice way to move excell export to ViewModel and bind to ICommand (other Commands I am binding to ICommand with RelayCommand - http://msdn.microsoft.com/en-us/magazine/dd419663.aspx#id0090030)?

2. My GridDataControl is bind to ObservableCollection. Is there a way to 'export' to excel this collection; just passing collection name or similar?

Thank You.

3 Replies

SR Sivakumar R Syncfusion Team December 14, 2015 01:19 AM UTC

Hi vladimir,

Please find the sample to bind the Exporting with ViewModel command.
http://www.syncfusion.com/downloads/support/forum/121411/ze/ExportingSample-1787164161

Thanks,
Sivakumar


VC Vladimir Culum December 14, 2015 01:00 PM UTC

Thank You Sivakumar,

This is working great.


AS Ayyanar Sasi Kumar Jeyaraj Syncfusion Team December 16, 2015 04:34 AM UTC

Hi Vladimir,
 
Thank you for the update.
Please let us know if you have any further assistance.
 
Regards
Ayyanar

Loader.
Up arrow icon