Gride视图中的填充时间错误 [英] Fill Time Error in Gride view

查看:72
本文介绍了Gride视图中的填充时间错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Dim StrOpt = IIf(IsDBNull(EGDs.Tables(0).Rows(0)("OptionalFeatures")), 0, EGDs.Tables(0).Rows(0)("OptionalFeatures"))
           Dim str As String() = StrOpt.Split(New Char() {","c}, StringSplitOptions.RemoveEmptyEntries)
           For i As Integer = 0 To str.Length - 1
               For j As Integer = 0 To GrdOpFeatures.Rows.Count - 1
                   If GrdOpFeatures.DataKeys(j).Value().ToString() = str(i).ToString() Then
                       'CType(GrdElvBuildGrp.Rows(j).FindControl("ChkOpt"), CheckBox).Checked = True
                       'Dim chk As CheckBox = DirectCast(GrdElvBuildGrp.Rows(j).FindControl("ChkOpt"), CheckBox)
                       Dim chk As CheckBox = CType(GrdElvBuildGrp.Rows(j).FindControl("ChkOpt"), CheckBox)
                       chk.Checked = True
                   End If
               Next
           Next









错误:







error :

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

推荐答案

请检查是否有任何行都存在于GrdElvBuildGrp第j个位置
Please check there is any row exists inside GrdElvBuildGrp jth position


这篇关于Gride视图中的填充时间错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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