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
Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)