初學C#,請多指教!*_* try:for(int i=0;i<dg.Items.Tables.Count){for(int j=0;j<dg.Items.Tables[i].Rows.Count){...}} 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 for(i = 0; i <= DataGrid1.Items.Count -1 ; i++){//取值 Id = Convert.ToInt32(DataGrid1.Items[i].Cells[0].Text);} 网上很多的,你可以搜搜啊,对了,上面的应该还有i++,j++吧for(int i=0;i<dg.Items.Tables[i].cells.Count;i++){for(int j=0;j<dg.Items.Tables[i].Rows.Count;j++){...}} 云计算是怎么回事啊? Winform窗体-画图 DataGridView 按Delete删除正在编辑单元格内容 怎样使C#做的系统看起来更炫? 请问网络传输大文件,怎样才能获取最佳性能? 数据读取问题 rdlc报表如何使用chart控件 10分求正则表达式。。。郁闷死了。。死活写不对! 如何实现鼠标滚轴翻页 备份数据、求好方法.. 怎样将string类型的数据转换为DateTime类型? 怎样用XML来描述一个网页?
{
//取值
Id = Convert.ToInt32(DataGrid1.Items[i].Cells[0].Text);
}
for(int i=0;i<dg.Items.Tables[i].cells.Count;i++)
{
for(int j=0;j<dg.Items.Tables[i].Rows.Count;j++)
{
...
}
}