This is a migrated thread and some comments may be shown as answers.

How to delete girdview filter contol

2 Answers 103 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Tae Hoon
Top achievements
Rank 1
Tae Hoon asked on 31 May 2017, 04:24 AM

Hi. i use RadGridView including FilteringMode is FilterRow.

in this case, How to delete the filter Control? I want to use only default FilterRow function.

and  can i delete only Header Part in FilterRow?

 

If it is possible, Please give the solution, and Example Code. (Please Do not remark about 'ShowSearchPanel = true', I want to know only about FilterRow.)

 

Thanks

 

2 Answers, 1 is accepted

Sort by
0
Dilyan Traykov
Telerik team
answered on 02 Jun 2017, 11:23 AM
Hello Tae,

I already responded to the support ticket you opened. For completeness, I'm posting the reply here as well.

"In order to remove the filtering icon from the filter row, you can remove the corresponding element (PART_DropDownButton) from the control template of the FieldFilterControl.

In addition, you need to set the default filter operator of the column, by handling the FilterOperatorsLoading event. For example:

private void ClubsGrid_FilterOperatorsLoading(object sender, Telerik.Windows.Controls.GridView.FilterOperatorsLoadingEventArgs e)
{
    if ((e.Column as GridViewDataColumn).DataType == typeof(string))
    {
        e.DefaultOperator1 = FilterOperator.Contains;
    }
    else if ((e.Column as GridViewDataColumn).DataType == typeof(int))
    {
        e.DefaultOperator1 = FilterOperator.IsEqualTo;
    }
}

For your convenience, I'm attaching a sample project with the implementation.

As for your second requirement, I did not quite understand which part of the header row you want to delete. Could you please clarify this?"

May I kindly ask you to continue the communication in only one of the two threads so that we can keep the conversation history intact? Thank you in advance for your cooperation and understanding.

Regards,
Dilyan Traykov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
0
Dilyan Traykov
Telerik team
answered on 02 Jun 2017, 11:24 AM
Hello Tae,

I already responded to the support ticket you opened. For completeness, I'm posting the reply here as well.

"In order to remove the filtering icon from the filter row, you can remove the corresponding element (PART_DropDownButton) from the control template of the FieldFilterControl.

In addition, you need to set the default filter operator of the column, by handling the FilterOperatorsLoading event. For example:

private void ClubsGrid_FilterOperatorsLoading(object sender, Telerik.Windows.Controls.GridView.FilterOperatorsLoadingEventArgs e)
{
    if ((e.Column as GridViewDataColumn).DataType == typeof(string))
    {
        e.DefaultOperator1 = FilterOperator.Contains;
    }
    else if ((e.Column as GridViewDataColumn).DataType == typeof(int))
    {
        e.DefaultOperator1 = FilterOperator.IsEqualTo;
    }
}

For your convenience, I'm attaching a sample project with the implementation.

As for your second requirement, I did not quite understand which part of the header row you want to delete. Could you please clarify this?"

May I kindly ask you to continue the communication in only one of the two threads so that we can keep the conversation history intact? Thank you in advance for your cooperation and understanding.

Regards,
Dilyan Traykov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
GridView
Asked by
Tae Hoon
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Share this question
or