摘要: SaveFileDialog dlg=new SaveFileDialog(); dlg.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*";//文件筛选器 dlg.AddExtension=true;//保存文件时自动加扩展名 dlg.FilterIndex = 1 ;//文件筛选器的索引,1为txt dlg.RestoreDirect... 阅读全文
posted @ 2008-05-04 12:11 pensir 阅读(817) 评论(0) 推荐(0) 编辑
摘要: 我记得好像是不能直接绑定DataReader的.. 得用个BindingSource作个中介.. SqlDataReader sdr=cmd.ExecuteReader(); BindingSource bs=new BindingSource(); bs.DataSource=sdr; this.DataGridView1.DataSource=bs; 阅读全文
posted @ 2008-05-04 12:06 pensir 阅读(940) 评论(0) 推荐(0) 编辑