网格视图编辑特定行会产生问题. [英] Grid view editing specific row the it gives problems.

查看:96
本文介绍了网格视图编辑特定行会产生问题.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当它单击编辑"按钮时,出现以下错误
它的参数网格规范为零的代码

string [] a =新的string [grdsolution.Rows.Count];
//for(int j = 0; j< 1; j ++)
//{
for(int i = 0; i< grdsolution.Rows.Count; i ++)
{
试试
{
if(((grdsolution.Rows [i] .Cells [5] .Text == null))
{
ErrorLog(没有声明");
}
其他
{
a [i] = grdsolution.Rows [i] .Cells [5] .Text;
}

When it click on the edit button then i got the error int the following
code that it grid specification of the argument is zero

string[] a = new string[grdsolution.Rows.Count];
//for (int j = 0; j < 1; j++)
//{
for (int i = 0; i < grdsolution.Rows.Count; i++)
{
try
{
if ((grdsolution.Rows[i].Cells[5].Text == null))
{
ErrorLog("There is no statement");
}
else
{
a[i] = grdsolution.Rows[i].Cells[5].Text;
}

推荐答案

for (int i = 0; i ; grdsolution.Rows.Count; i++)


试试


try

for (int i = 0; i < grdsolution.Rows.Count; i++)


这篇关于网格视图编辑特定行会产生问题.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆