Datagrid export

M

Martin

Hello,

how can I export the contents of my datagrid to a text
format. I am using the following code

sw = new StringWriter();

tw = new HtmlTextWriter(sw);

dGrid.RenderControl(tw);

string data = sw.ToString(); //needs to be plain text

/* expected format

empno empname email
------------------------
1 Jerry (e-mail address removed)
2 mark (e-mail address removed)


*/

I would appreciate any help

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,110
Latest member
OdetteGabb
Top