| .NET DotNet Forum Index » General Discussion » datagridview column hiding... |
|
Page 1 of 1 |
|
| Author |
Message |
| Vinki... |
Posted: Wed Jul 01, 2009 5:16 pm |
|
|
|
Guest
|
I spent lot of time on this and could not figure out. I would geatly
appreciate if anyone cn help me. I have a datagridview and I am binding the
datagridview with datatable, actually I am converting a dataview to datatble
after applying the filter. After binding my datagridview, I am trying to hide
the first column and I am getting an error
"Index was out of range. Must be non-negative and less than the size of the
collection.
Parameter name: index"
Below is my code. I have two rows and 22 columns.
Private Sub bindGrid(ByVal dv As DataView)
Try
Dim ChatsChild As New edsChild
Dim dt As New DataTable
dt = dv.ToTable()
grdPreviousCases.DataSource = dt
grdPreviousCases.Refresh()
Me.Refresh()
Me.grdPreviousCases.Columns(0).Visible = False
Catch ex As Exception
End Try
End Sub |
|
|
| Back to top |
|
|
|
|