I want to create a filter to filter text in a datagrid as i type in a text box. I have two text boxes, one to filter in text that i type and one to filter out text that i type. I want the data grid to update as i type into either one of the textboxes. Here is some of my code:
private void txtFilterIn_TextChanged(object sender, TextChangedEventArgs e)
{
DataView dv = dgPortStatus.DataContext as DataView;
if (dv != null)
{
if (dv.Table.TableName.ToUpper() == "PORTSTATUS")
{
FilterDataGrid(txtFilterIn.Text, txtFilterOut.Text, _dicPortStatus[cmbGroups.SelectedItem.ToString()]);
}
}
List<QuarantineView> qvList = dgPortStatus.DataContext as List<QuarantineView>;
if (qvList != null)
{
//Filter on quarantine manager
FilterQuarantineViewList(qvList);
}
}
edit your post and add CODE tags... then we'll see what can be done
win7 x86, VS 2008 & 2010, C++/CLI, C#, .NET 3.5 & 4.0, VB.NET, VBA... WPF is comming
remeber to give feedback you think my response deserves recognition? perhaps you may want to click the Rate this post link/button and add to my reputation
private lessons are not an option so please don't ask for help in private, I won't replay
if you use Opera and you'd like to have the tab-button functionality for the texteditor take a look at my Opera Tab-UserScirpt; and if you know how to stop firefox from jumping to the next control when you hit tab let me know
Bookmarks