Hi,
I am working on the Syncfusion Datagrid (Essential Suite 1.6.1.0). I am facing a problem when I am trying to save the grid data into a Text file Format. what I am doing right now, is written below:
private void SaveAsTextButton_Click(object sender, System.EventArgs e)
{
try
{
SaveAnalysisFileDialog.ShowDialog();
string temp = @"C:\Documents and Settings\akhanna\Desktop\abcd\temp.txt";
AnalysisResultsGrid.SaveBinary(temp);
StreamReader sr =new StreamReader(temp,System.Text.Encoding.ASCII);
string fileName = SaveAnalysisFileDialog.FileName;
StreamWriter sw = new StreamWriter(fileName,false);
sw.Write(sr.ReadToEnd());
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
It is writing the grid data in temp.txt file, But when I am trying to read it, this file is locked. So I am getting nothing in stream reader.
Please suggest me some solution for this problem??
Thanks
Aruni
AD
Administrator
Syncfusion Team
July 20, 2006 01:31 PM UTC
Hi Aruni,
Please refer the forum thread for Text format export.
http://www.syncfusion.com/support/forums/message.aspx?MessageID=45762
Please refer the forum thread for Excel export,
http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=44533
Thanks
Haneef