Deal of the Month: 50% Discount on Windows 7 (Limited Amazon.com offer) Main Page | Report this Page
.NET DotNet Forum Index  »  General Discussion  »  datagridview column hiding...
Page 1 of 1    

datagridview column hiding...

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
 
 
Page 1 of 1    
All times are GMT - 5 Hours
The time now is Sun Nov 08, 2009 2:46 am