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
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