I keep getting this error: "The type or namespace name 'SaveFileProvider' could not be found (are you missing a using directive or an assembly reference?) "
I know that I'm missing reference, but I'm referencing everything I can think of to reference, but it's still not picking it up.Please see below all that I'm using:
using System;using System.Collections;using System.Collections.Generic;using System.Collections.ObjectModel;using System.ComponentModel;using System.IO;using System.Linq;using System.Text;using System.Windows;using System.Windows.Controls;using System.Windows.Data;using System.Windows.Documents;using System.Windows.Input;using System.Windows.Media;using System.Windows.Media.Imaging;using System.Windows.Navigation;using System.Windows.Shapes;using System.Threading;using Infragistics.Controls.Grids;using Infragistics.Documents.Excel;using Infragistics.Olap;using Infragistics.Olap.Data;using Infragistics.Olap.FlatData;
Here is the problem bit of code in which the only error I am getting is the fact that SaveFileProvider can't be found
private void SaveExport(Workbook dataWorkbook) {
SaveFileProvider saveProvider = new SaveFileProvider(); saveProvider.Dialog.DefaultExt = "xls";
bool? showDialog = saveProvider.Dialog.ShowDialog();
if (showDialog == true) {
using (Stream exportStream = saveProvider.Dialog.OpenFile())
{
dataWorkbook.Save(exportStream); exportStream.Close();
}
What exactly am I doing wrong here?
Hi,
Concerning the SaveFileProvider, I gather from your snippet that you are working with the XamPivotGrid and using our Export to Excel sample as your guide. I see that the SaveFileProvider is referenced there.
It’s actually a class located in the Infragistics.Samples.Shared.DataProviders
public class SaveFileProvider
public SaveFileProvider()
Dialog = new SaveFileDialog();
public SaveFileDialog Dialog { get; set; }
Let me know if I can help further.
Thanks. That helped clear things up :)