To export data in notepad you need to crate .txt file.
if your datagrid have more than one column you need to provide the seperater for columns such as comma(CSV) or Tabs.
steps
TextWriter tw = new StreamWriter("date.txt");
for(int i=0;i<dg.rowcount;i++)>
{
string line="";
for(int j=0;j<dg.columncount;j++)>
{
line=line+ "your seperator for columns" +dg.rows[i].cells[j].value.tostring();
}
tw.WriteLine(line);
}
tw.close();