This is a migrated thread and some comments may be shown as answers.

[Solved] Export file extension issue

1 Answer 93 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Joseph
Top achievements
Rank 2
Joseph asked on 06 May 2013, 08:43 PM
Hi Telerik Community,

I am using the Telerik ASP.NET AJAX controls (version 2011.1.519.35) and trying to export a file. I would like the file extension to be .txt, but it just freezes on the button click - see code below.

Protected Sub btnExport_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExport.Click       
        RadGrid1.ExportSettings.FileName = "Export"
        RadGrid1.ExportSettings.ExportOnlyData = True
        RadGrid1.ExportSettings.IgnorePaging = True
        RadGrid1.ExportSettings.Csv.ColumnDelimiter = Telerik.Web.UI.GridCsvDelimiter.Tab
        RadGrid1.ExportSettings.Csv.RowDelimiter = Telerik.Web.UI.GridCsvDelimiter.NewLine
        RadGrid1.ExportSettings.Csv.EncloseDataWithQuotes = False
        RadGrid1.ExportSettings.Csv.FileExtension = "txt"
        RadGrid1.MasterTableView.ExportToCSV()
End Sub

When I use any thing else for the file extension, it works properly, but when I set the FileExtension = "txt" it does not work, just freezes up. For example, if I use FileExtension = "tx" it will work just fine. It only freezes when it is "txt"

Does anyone have any ideas of what is causing this, or how to get it to export with the txt extension?

Thanks,
Joe

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 09 May 2013, 07:50 AM
Hi Joseph,

I have prepared a sample RadGrid web site to test the described behavior. On my side the grid content is exported correctly using the mentioned extension. Can you please check out the attached application and verify that it works as expected on your end, too?

Kind regards,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Joseph
Top achievements
Rank 2
Answers by
Eyup
Telerik team
Share this question
or