我有 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
但我犯了错误:
指数超出范围。必须是非负数且小于集合的大小。参数名称:索引