Declined
Last Updated: 05 Dec 2023 09:13 by ADMIN
Sebastian
Created on: 04 Dec 2023 14:20
Category: DataGrid
Type: Feature Request
1
DataGrid: Provide a way to open Filtering UI from external UI
Currently Filtering UI can be shown when tapping/clicking on the Filter Icon
2 comments
ADMIN
Didi
Posted on: 05 Dec 2023 09:13

Hello, 

The scenario can be achieved by using the FilterTap command.

From the external UI you need to execute the FilterTap command and pass the concrete column you want the Filtering UI to be open for. Sample project is attached.

<Button Text="Open Name filtering UI" Clicked="openfiltering_Clicked"/>

<telerik:RadDataGrid Grid.Row="1" x:Name="grid"
                     ItemsSource="{Binding Items}"
                     AutoGenerateColumns="False">
    <telerik:RadDataGrid.Columns>
        <telerik:DataGridTextColumn PropertyName="Name"
                                    HeaderStyle="{StaticResource style}"
                                    x:Name="nameColumn"/>
        <telerik:DataGridNumericalColumn PropertyName="Population" 
                                         HeaderStyle="{StaticResource style}"
                                         x:Name="populationColumn"/>
    </telerik:RadDataGrid.Columns>
</telerik:RadDataGrid>
    private void openfiltering_Clicked(object sender, EventArgs e)
    {
        // generate the context for the column you want to open Filtering UI
        var context = this.grid.CreateFilterTapContext(this.nameColumn);
        // execute filtertap command for this context (the column you want to open filtering ui for)
        this.grid.CommandService.ExecuteDefaultCommand(DataGridCommandId.FilterTap, context);
    }

Regards,
Didi
Progress Telerik

A brand new .NET MAUI course was just added to the Virtual Classroom. The training course is developed to help you get started with the Telerik UI for .NET MAUI components and features. It aims to put you in the shoes of an engineer who adds new features to an existing application. You can check it out at https://learn.telerik.com
Attached Files:
Sebastian
Posted on: 04 Dec 2023 15:45

Let me explain why customers may need this feature:

While using the control on a mobile phone, the filter icons in the column header may be difficult to klick/tap for some user. Instead of opening the filter dialog they change the sort order on accident.

It would be better (in our use case) to design one filter icon on the content page a user can easily hit. I then, want to popup a side drawer where I list (vertically) all columns represented as a button. Hitting one of those buttons I wanted to then open the filter dialog.