次のように列名を変更したい RowDatabound イベントがあります。
Protected Sub gvKeyValueOfstringstring_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles gvKeyValueOfstringstring.RowDataBound
If e.Row.RowType = DataControlRowType.Header Then
gvKeyValueOfstringstring.Columns(0).HeaderText = "Match"
gvKeyValueOfstringstring.Columns(1).HeaderText = "Replace"
End If
End Sub
しかし、私はエラーになっています:
インデックスが範囲外でした。負ではなく、コレクションのサイズより小さくなければなりません。パラメータ名:インデックス