I have create a project where the user creates different filter buttons which, when clicked, updates the SearchText in the SearchPanel. And then the user can persist these saved buttons and reload at startup. Everything is working great except one thing! If the user sets SearchText and the grid then gets new data, the SearchText goes blank. Is there a way to persist the SearchText regardless of the underlining data changing?
I am actually using an external Textbox to set the SearchText and followed some of your examples of binding to the SeachText.
private void OnLoaded(object sender, RoutedEventArgs e)
{
this.GridStats.ShowSearchPanel = false;
_vmSearchPanel = this.GridStats.ChildrenOfType<GridViewSearchPanel>().FirstOrDefault();
this.txtFilter.SetBinding(TextBox.TextProperty, new Binding("SearchText") { Source = _vmSearchPanel.DataContext, Mode = BindingMode.TwoWay });
}
On a side note, it would be nice to be able to easily save/load SearchText because it makes a quicker way version saving all the Filter criteria on the Grid or using a RadFilter if you just want one textbox.