Rowfilter ArgumentOutOfRangeException

  • Thread starter Thread starter Thomas Usselman
  • Start date Start date
T

Thomas Usselman

Hi,

I am getting an ArgumentOutOfRangeException error when in the following line
of code:
dtitems.DefaultView.RowFilter = "class = '" & cboClass.Text & "'"

Any advice would be great. I have included the sub below.

Thanks,
Tom Usselman

Private Sub cboClass_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles cboClass.SelectedIndexChanged
clearitmdata()

Try

dtitems.DefaultView.RowFilter = ""

If cboClass.Text = "" Then

dtitems.DefaultView.RowFilter = "class = '' "

Else

If dtitems.DefaultView.RowFilter = "class = '" & cboClass.Text & "'" Then

Else

Try

dtitems.DefaultView.RowFilter = "class = '" & cboClass.Text & "'"

Catch

MessageBox.Show("Error" & cboClass.Text)

End Try

End If

End If

Catch

MessageBox.Show("Error" & cboClass.Text)

End Try

End Sub
 
Are there any controls bound to dtitems? Do they have any event handlers?
 
Back
Top