It works fine for me using a DataView.RowFilter:
private void textBoxFilter_TextChanged(object sender, EventArgs e)
{
StringBuilder sb = new StringBuilder();
AppendFilter(sb, "TrackName", tbTrackFilter.Text, "");
AppendFilter(sb, "Band", tbBandFilter.Text, " AND ");
AppendFilter(sb, "Album", tbAlbumFilter.Text, " AND ");
dvFiles.RowFilter = sb.ToString();
}
private void AppendFilter(StringBuilder filter, string column, string filterMatchText, string append)
{
if (!string.IsNullOrWhiteSpace(filterMatchText))
{
filterMatchText = filterMatchText.Replace("'", "''");
if (filter.Length != 0)
{
filter.Append(append);
}
filter.AppendFormat(" [{0}] LIKE '%{1}%' ", column, filterMatchText);
}
}
So the chances are it's the KeyChar in your code that causes the problem.
Use the debugger, and put a breakpoint on the first line of your handler and step the code through to find out exactly what is happening.