private void ScrollToSelectedItem() { if (GrdBanks.Items.CurrentItem != null) { GrdBanks.CurrentCellInfo = new GridViewCellInfo(GrdBanks.Items.CurrentItem, GrdBanks.Columns[0]); GrdBanks.ScrollIntoView(GrdBanks.SelectedItem); GrdBanks.Focus(); textSearch.Focus(); } }
private void FormCollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { if (grdFormModels.Items.Count > 0 && canChangeSelection) { grdFormModels.Items.MoveCurrentToFirst(); textSearch?.Focus(); } CurrentCountAfterFilter.Text = grdFormModels.Items.Count.ToString(); }
private void TextSearchLoaded(object sender, RoutedEventArgs e) { grdFormModels.Focus(); textSearch = grdFormModels.ChildrenOfType <RadWatermarkTextBox>().FirstOrDefault(s => s.Name == "PART_SearchAsYouTypeTextBox"); if (textSearch != null) { textSearch.Focus(); textSearch.PreviewKeyDown += TextSearchPreviewKeyDown; grdFormModels.Items.CollectionChanged += FormCollectionChanged; } }
private void ClearClientFilters() { var clearSearchValue = GridViewSearchPanelCommands.ClearSearchValue as RoutedUICommand; clearSearchValue.Execute(null, grdFormModels.ChildrenOfType <GridViewSearchPanel>().FirstOrDefault()); grdFormModels.FilterDescriptors.SuspendNotifications(); foreach (GridViewColumn column in grdFormModels.Columns) { column.ClearFilters(); } grdFormModels.FilterDescriptors.ResumeNotifications(); textSearch.Focus(); }
private void TextSearchLoaded(object sender, RoutedEventArgs e) { GrdBanks.Focus(); textSearch = GrdBanks.ChildrenOfType <RadWatermarkTextBox>().FirstOrDefault(s => s.Name == "PART_SearchAsYouTypeTextBox"); if (textSearch != null) { textSearch.Focus(); textSearch.PreviewKeyDown += TextSearchPreviewKeyDown;; GrdBanks.Items.CollectionChanged += GrdBankCollectionChanged; manageOwnersViewModel = (ManageOwnersViewModel)DataContext; } var closeButton = GrdBanks.ChildrenOfType <RadPathButton>().FirstOrDefault(b => b.Name == "CloseButton"); if (closeButton != null) { closeButton.Visibility = Visibility.Collapsed; } }