index was outside the bounds of the array
Dim totalcolumn As Integer If grdTraining.Columns.Count > totalcount Then totalcolumn = grdTraining.Columns.Count - totalcount For i As Integer = 0 To totalcolumn Dim field1 As HyperLinkField = DirectCast(Me.grdTraining.Columns(j), HyperLinkField) field1.DataTextField = ColumnsArray(i) Me.grdTraining.Columns(j).Visible = False j = j + 1 Next End If BindGridView(grdTraining, dtTrainings)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)