在dataset中加入一个自增的datacolumn,
解决方案 »
- System.ArgumentOutOfRangeException: 索引超出范围,求教
- 网站中的简历下载用.net怎么做?
- aspx treenode 递归遍历当前节点找下一个节点的错误,找到就停。。
- 新浪微博切换模版的原理是什么
- dataGridView 获取所有行,某一列的值?
- 我要发邮件,,邮件内容是一个网页..所有图片地址已经是绝对路径了..怎么还不行呢??
- 怎样将PrintDocument里的内容导成jpg图片?
- 急!!!!!!!!快
- RadioButton中的text如何转换成int32?
- 为什么winform DataGridView在读取的时候会多出来个字?Listview却不会显示出来
- 关于文件操作的问题!
- 关于安装程序打包Framework的问题给高分!!!!!!!!!
sequence.DataType=System.Type.GetType("System.Int32");
sequence.AllowDBNull=false;
sequence.Caption="sortnum";
sequence.ColumnName="count";
sequence.DefaultValue=0;
ds.Tables[0].Columns.Add(sequence);
for(int i=0;i<ds.Tables[0].Rows.Count;i++)
{
ds.Tables[0].Rows[i]["count"]=i+1;
}
DataView source=new DataView();
source=ds.Tables[0].DefaultView;
DataGrid1.DataSource=source;
DataGrid1.DataBind();