Skip to content

Commit

Permalink
maybe a trycatch will help fix the nullpointer 😂
Browse files Browse the repository at this point in the history
  • Loading branch information
yakobie committed Apr 9, 2020
1 parent b928f5c commit ec87d94
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion acnhpoker/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,14 @@ private void customAmountTxt_KeyPress(object sender, KeyPressEventArgs e)

private void itemSearchBox_TextChanged(object sender, EventArgs e)
{
(itemGridView.DataSource as DataTable).DefaultView.RowFilter = string.Format("Name LIKE '%{0}%'", itemSearchBox.Text);
try
{
(itemGridView.DataSource as DataTable).DefaultView.RowFilter = string.Format("Name LIKE '%{0}%'", itemSearchBox.Text);
}
catch
{
itemSearchBox.Clear();
}
}

private void itemGridView_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
Expand Down

0 comments on commit ec87d94

Please sign in to comment.