I am using the code (VS2008) I found under the article "Automatic WPF Toolkit DataGrid Filtering", which works very well. It is implemented as a new "style" for a datagrid's header, NOT as an extension of the datagrid itself. My question is how can I save the values entered into those filter boxes, and later use them to re-enter those values?
If not possible as is, how would I go about modifying the source code (available from link above) to the filter (WPF newbie).
Thanks,
Enrico
Don't have too much time to go deep into the code analysis, but you can find in code provided:
In Generic.xaml
at line 55
you will find this code:
<Setter Property="Template">
This code actually sets the template for the GridColumn. In the middle of that XAML
you will find DelayTextBox
type declaration. That is your key !
From DelayTextBox
type's OnTextChanged(TextChangedEventArgs e)
begins the search.
Just another hint again:
In DataGridColumnFilter.cs
you will find the following property:
public FilterData FilterCurrentData
{
get { return (FilterData)GetValue(FilterCurrentDataProperty); }
set { SetValue(FilterCurrentDataProperty, value); }
}
Put breakpoint to get/set
, run the program and filter the columns. You will get a clear callstack
vision, so can decide where you can pick up the actual value of the textbox, based on your app design.
EDIT
Look at FilterData
type, it, I think, contains an information you need.
Hope this helps.
Regards.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With