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
2290
Import data from .CSV File to XamGrid
posted

Hi All,

I want to import data from .CSV file and shown in xamgrid. Please help me

Regards

Sufyan

Parents
No Data
Reply
  • 2290
    posted

    Hi All,

    Telerik give us the functionality of export data from file and shown in grid. Following is telerik code but i want this functionality in infragistics.

     private void btnExport_Click(object sender, RoutedEventArgs e)
            {
                SaveFileDialog dialog = new SaveFileDialog();
                dialog.DefaultExt = "csv";
                dialog.Filter = "CSV files (*.csv)|*.csv|All files (*.*)|*.*";
                dialog.FilterIndex = 1;

                if (dialog.ShowDialog() == true)
                {
                    using (Stream stream = dialog.OpenFile())
                    {
                        GridViewExportOptions exportOptions = new GridViewExportOptions();
                        exportOptions.Format = ExportFormat.Csv;
                        exportOptions.ShowColumnHeaders = true;

                        radGridView1.Export(stream, exportOptions);
                    }
                }
            }

    Regards

    Sufyan

Children