From: Ryan on
I am trying to hide a coloumn if the DataType is Byte (Byte[]) but still get
the exception; how do I either hide this field or not add to the DataGridView?
the following exception occured in the DataGridView:
system.argumentexception:parameter is not valid

Dim oAdapter As OracleDataAdapter
oAdapter = New OracleDataAdapter(sSQL, oConn)
myDataSet = New DataSet()
oAdapter.Fill(myDataSet)

myBindingSource = New BindingSource()
myBindingSource.DataSource = myDataSet

With myDataSet.Tables(0)
For i As Integer = 0 To myDataSet.Tables(0).Columns.Count - 1
If InStr(.Columns(i).DataType.ToString, GetType(Byte).ToString) > 0
Then
myDataSet.Tables(0).Columns(i).ColumnMapping = MappingType.Hidden
End If
Next
End With

DataGridView1.DataSource = myDataSet.Tables(0)