I am using VB.Net 2005
I want to drop a column from a listview. My code is throwing an error and I don't know why. Please help me fix it.
I put a message beside the offending line in the code. The error reads:
Null Reference Exception was unhandled.
Object reference not set to an instance of an object.
Dim column As ColumnHeader
For Each column In lvTreeVol.Columns
Dim instance As ListView.ColumnHeaderCollection
If column.Text = "Block" Then
instance.Remove(column) ' error thown here