DataGridView default format

dataGridView1.Columns[1].DefaultCellStyle.Format = “yyyy-MM-dd HH:mm:ss”;

Anuncios

Save dialog

SaveFileDialog dlg = new SaveFileDialog();

dlg.FileName = “file name”;

dlg.DefaultExt = “.pdf”;

dlg.Filter = “Text documents (.pdf) | *.pdf”;

if(dlg.ShowDialog() == DialogResult.OK){

string Pdfname = dlg.FileName;

Process.Start(Pdfname);

}