for ( i = 0; i < this.GridView1.Rows.Count; i++)
{
RadioButtonList rblscore = (RadioButtonList)GridView1.Rows[i].Cells[3].FindControl("rblscore"); int j = Convert.toInt16(GridView1.Rows[i].Cells[0].Text );//获取ID值
score[j] = rblscore.SelectedValue;//以id做为索引
}
在上述的做法中,我怎么样也不能把j顺利地转化为int型以做为score的索引,大家有空的话帮忙看一下!
{
RadioButtonList rblscore = (RadioButtonList)GridView1.Rows[i].Cells[3].FindControl("rblscore"); int j = Convert.toInt16(GridView1.Rows[i].Cells[0].Text );//获取ID值
score[j] = rblscore.SelectedValue;//以id做为索引
}
在上述的做法中,我怎么样也不能把j顺利地转化为int型以做为score的索引,大家有空的话帮忙看一下!
解决方案 »
- 可以用streamreader method来做把excel导入datagridview嘛
- 求解在一个form窗体中可以同时向2张表访问数据吗
- 如何获得其他网站的数据?
- .NET问题 帮忙解决下
- 在程序中打开一个网页的方法
- 高手帮忙看看,我这.netsdk装不上,是什么原因啊?
- 做组件时遇到的问题:属性 object DataSet在属性框中为不可写(灰色)
- 编码类型转换的问题
- 内容过滤问题
- 请教专家:如果捕获在DataGrid上添加数据不合法,产生的NoNullAllowedException?我想自定义出错信息。
- 数据库从Access SqlServer换成MySql后产生的问题
- 汉字转化拼音过程中,出现字母或者英文如何处理(C#)?
或者你直接:Convert.ToInt32(GridView1.Rows[i].Cells[0].Text.ToString()),如果这个不行的话,那就只能用上面那种了。
应该可以,如果Text值是数字的话