Column Header tab order

4 posts, 1 answers
  1. Cory
    Cory avatar
    6 posts
    Member since:
    Jun 2015

    Posted 09 Dec 2015 Link to this post

     

    So I think I found an issue with tabbing between column headers, after the columns have been rearranged.  

    When changing column position (rearranging columns) on a rad grid, tabbing between headers does not follow the display index.  In instead follows the original position of the column.

     You can see this behavior on the "GridView Filtering Configuration" demo from the WPF controls examples Telerick tool.

    Once you choose the Filtering Configuration demo\example, change the filtering mode to "FitlerRow".  You can tab through the headers and the keyboard focus will go to each column properly (Customer ID, Company Name, Country, etc..)

    If you move the Country column in between the Customer ID and Company Name.  When starting at the Customer ID and tabbing, the tab order remains unchanged (Customer ID, Company Name, Country, etc..).  When in fact it should go Customer ID, Country, Company Name, etc.

    When selecting a row, the tab order works as expected.

    I did some research, but was unable to find a way to work around this.  Am I missing something.

    Additionally, I was able to smooth out the tabbing (to reduce the number of tabs in the header), with the code below.

     

            private void Grid_Loaded(object sender, RoutedEventArgs e)
            {
                foreach (var headerCell in AssociatedObject.ChildrenOfType<GridViewHeaderCell>())
                {
                    //var popUp = headerCell.ChildrenOfType<Popup>().FirstOrDefault();

                    var filteringControl = headerCell.ChildrenOfType<FieldFilterControl>().FirstOrDefault();

                    if (filteringControl != null)
                    {
                        (filteringControl.ChildrenOfType<RadDropDownButton>().FirstOrDefault()).IsTabStop = false;
                    }

                    var contentControls = headerCell.ChildrenOfType<ContentControl>().Where( con => con.IsTabStop == true).ToList(); ;

                    foreach (var content in contentControls)
                    {
                        content.IsTabStop = false;
                    }          
                }
            } 

     

            private void Grid_FieldFilterEditorCreated(object sender, EditorCreatedEventArgs e)
            {
                var stringFilterEditor = e.Editor as StringFilterEditor;
                if (stringFilterEditor != null)
                {
                    stringFilterEditor.MatchCaseVisibility = Visibility.Collapsed;
                }
            }

     

    Thanks,

    Cory

     

     

  2. Answer
    Petya
    Admin
    Petya avatar
    975 posts

    Posted 14 Dec 2015 Link to this post

    Hello Cory,

    Thanks for letting us know about this, indeed it appears to be an issue in RadGridView's functionality. I logged it in our backlog and updated your Telerik points in appreciation of the report. You can follow the team's progress on this through this item in our public portal. I'm afraid that I wasn't able to find a workaround either, so for the time being, there's nothing I can suggest in order to avoid that behavior.

    As to the logic you mentioned, please bear in mind that RadGridView supports UI Virtualization both for its columns and rows, and reuses many of its visual elements like GridViewCell, GridViewRow, etc. For this reason, we advise against using the elements directly in code and applying modifications in them so I'll suggest modifying the templates of the respective controls instead. Take a look at the Styling Column Headers and Styling FilterRow articles in our documentation for a reference on how you can apply the modifications.

    I hope this helps.

    Regards,
    Petya
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
  4. Cory
    Cory avatar
    6 posts
    Member since:
    Jun 2015

    Posted 14 Dec 2015 in reply to Petya Link to this post

    • "Take a look at the Styling Column Headers and Styling FilterRow articles in our documentation for a reference on how you can apply the modifications."

     Ok I will, thanks for the tip.

     

    Cory

     

  5. Cory
    Cory avatar
    6 posts
    Member since:
    Jun 2015

    Posted 15 Dec 2015 Link to this post

    Just to close the loop.  To turn off the tab stop on the RadDropDownButton control, I added a setter to the "FieldFilterDropDownButtonStyle" style in the Telerik.Windows.Controls.GridView.xaml file.

     To turn off the tab stop on the content control - I modified the first content control in the "FieldFilterControlTemplate" in the same file.

     I went ahead and left the code that turned off MatchCaseVisibility - since that uses Telerik's public API.

    Thanks for the help,

    Cory

     

     

Back to Top