We've got a silverlight application with dynamic columns. We want to allow the user to filter after they type in something in the header filter text field and press the enter key. This is done through the keyDown event and works fine:
sender, System.Windows.Input.KeyEventArgs e)
(e.PlatformKeyCode == 13)
textToFilter = ((TextBox)e.OriginalSource).Text;
GridViewColumn currentColumn = ((RadGridView) sender).CurrentColumn;
currentColumn.ColumnFilterDescriptor.FieldFilter.Filter1.Operator = FilterOperator.IsEqualTo;
currentColumn.ColumnFilterDescriptor.FieldFilter.Filter1.Value = textToFilter;
The only problem we're having is with getting the CurrentColumn. The RadGridView.CurrentColumn property is set to the column whose element has been selected (clicked) so when you don't do that, it doesn't return the column whose filter text box has been edited.
Can you please tell me if there is a way to know what the current (focused) column is after you type in something in the column header filter text box?