忘了
帖子在这里
http://community.csdn.net/Expert/topic/5653/5653599.xml?temp=7.745624E-04
帖子在这里
http://community.csdn.net/Expert/topic/5653/5653599.xml?temp=7.745624E-04
解决方案 »
- C#快速统计文件夹及其子文件下的文件个数
- c# 参数问题
- 关于文件夹得打开和保存
- 一个字符串是否包含另一个字符串的问题
- 高手请指教-类型转换字符型转换成uint
- C# web程序的模式窗口关闭问题
- 错误 1 找不到类型或命名空间名称“button”(是否缺少 using 指令或程序集引用?) C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects
- 想用post消息完成网页的点击功能.求大神给点思路
- C#怎样在win2000局域网里面复制文件呢?
- 请教个关于git的问题
- 关于++的简单问题
- 求一个 C#比较全的基类,,,感谢!急急急!!
用代码创建DataGridView这好办。。
用设计器创建一个DataGridView。。等一系列属性都设置好了。。
再转到Form1.Designer.cs文件中去看不就得了。问题二:
dataGridView1.Columns[0].ValueType = typeof(string);
SqlDataAdapter sda = dbop.GetPay(cPsn_Num.Text);//GetPay()为一个数据库取值的方法
DataTable table = new DataTable();
sda.Fill(table);
bindingSource1.DataSource = table;
hr_hi_payDataGridView.DataSource = bindingSource1;
{
DataSet ds = new DataSet();
DataOpen();
adpter = new SqlDataAdapter(sqlString,conn);
ds.Clear();
adpter.Fill(ds);
DataClose(0);
return ds;
}
private void ViewDataGrid(string sql)
{
string sqlString = "select begNum as '开始编号',endNum as '结束编号',"+
"npMoney as '金额',other as '备注',personnel as '操作人员',"+
"npDate as '操作时间' from np_Log ";
sqlString += sql;
DataView dw = DataAccess.DataAdapter(sqlString).Tables[0].DefaultView;
dgwLog.DataSource = dw; dgwLog.Columns[0].Width = 80;
dgwLog.Columns[1].Width = 80;
dgwLog.Columns[2].Width = 60;
dgwLog.Columns[3].Width = 80;
dgwLog.Columns[4].Width = 80;
dgwLog.Columns[5].Width = 100;
}前段时间刚做过一个简单的,你可以看看。。