Hi Wenkai
Thank you for contacting Syncfusion support.
We have analyzed your query to focus TextBox after performaing data operations in SfDataGrid. By default, focus will set to the currently operating control. To achieve your requirement to focus TextBox after filtering and sorting, you can manually set the focus to textbox using the events of those operations as like below code snippet
|
this.sfDatagrid.View.CollectionChanged += View_CollectionChanged;
private void View_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
this.AssociatedObject.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.ApplicationIdle, new Action(() =>
{
TextBox textBox = Application.Current.MainWindow.FindName("textBox") as TextBox;
if (textBox != null)
{
textBox.Focus();
}
}));
} |
Please find the sample for the same and let us know if this helps you.
http://www.syncfusion.com/downloads/support/forum/140309/ze/WPF2073658178If we misunderstood on your requirement then, kindly revert us with more details along with the sample and screenshot or video to illustrate your requirement, thereby we could analyze further and update you with the appropriate solution at the earliest.
Please let us know if you have any other questions.
Regards,
Deivaselvan