Esempio n. 1
0
 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();
     }
 }
Esempio n. 2
0
        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();
        }
Esempio n. 3
0
        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;
            }
        }
Esempio n. 4
0
        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();
        }
Esempio n. 5
0
        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;
            }
        }