For Each row As GridViewRow In gv.Rows If row.RowType = DataControlRowType.DataRow Then For j = 0 To dtop.Rows.Count - 1 Dim tf As New TemplateField() Dim cb As New CheckBox tf.HeaderText = "" & dtop.Rows(j)(0) & "" gv.Columns.Add(tf) row.Cells(j + 1).Controls.Add(cb) Next End If Next
row.Cells(j + 1).Controls.Add(cb). The exception is on this line and the exception is "Specified argument was out of the range of valid values. Parameter name: index"..
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)