我这样做是为了将数据添加到 gridview
Dim dSource As New SqlDataSource
dSource.ConnectionString = MyConnectionString
dSource.SelectCommand = "select..."
GridView1.DataSource = dSource
GridView1.DataBind()
然后我想隐藏第一列
GridView1.columns(0).visible=false
并且服务器抛出异常:
ArgumentOutOfRangeException.