Unplanned
Last Updated: 09 May 2022 13:26 by Felix
Felix
Created on: 09 May 2022 13:26
Type: Feature Request
0
WPF Grid// Allow column filter identification to be related to the column name

Scenario: The steps for applying a filter in WPF grid columns is tied up with the index of the column in the current view of the grid. However, the columns in WPF grid can be reordered. And after changing the columns initial order, any steps to interact with the filtering, will act based on index in the current order.

Steps to get the scenario in action:

  1. Get to the grid in the application.
  2. Filter some of its columns.
  3. Change how the columns are listed in the grid.
  4. Apply changes in the filtering or clear the filtering. 

Expected is that you can identify the specific columns filters by their name, for example.
Actual is that the interacting with the filters is based on the order of columns. Or in other words the filter for the second column will be opened, if that was recorded, no matter if it is a different column. 

Feature request: Implement the option to use the column names to identify the filters to select. 

Workaround: The lack of this functionality can be covered in a coded step - the sample code below is based on the structure of the grid from the Telerik WPF demo app

// Add the cilumn name textbloxk element in the Elements Explorer so that you can use it in the code. 
            // Ensure its find expression uses the TextContent attribute - that way the element will be consistently identified no matter where it is in the grid
            var lastNameTextblock = Applications.WPF_Demosexe.WPF_Controls_Examples__GridView_ChartView_ScheduleView_RichTextBox_Map_Code_Samples.LastNameTextblock;
            // Locate the first parent element of that textblock, which is of type grid
            var cell = lastNameTextblock.Parent("Grid");
            // Create a find expression, which searches for element with XamlTag=filteringdropdown
            var expression = new XamlFindExpression("XamlTag=filteringdropdown");
            // Use it to locate and click on that element. 
            cell.Find.ByExpression(expression).User.Click();

 

0 comments