This is a migrated thread and some comments may be shown as answers.
Gridview Filter
8 Answers 40 Views
This is a migrated thread and some comments may be shown as answers.
Mohamed Hussain Nabhan Hussain
Top achievements
Rank 1
Mohamed Hussain Nabhan Hussain asked on 18 Sep 2012, 12:50 PM
Dear Telerik,

Please find attached gridview filter snapshot. If the items are more its not displaying other filter criterias.

Thanks in advance.....

Regards,
Mohammed. Yasser

8 Answers, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 20 Sep 2012, 01:28 PM
Hi,

 Please follow the approach in this troubleshooting article in order to resolve your issue. If this does not help I would asked you to test with the latest version.  It would be even better to send me a sample project showing the issue in order to investigate it.

Kind regards,
Yoan
the Telerik team

Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

0
Mohamed Hussain Nabhan Hussain
Top achievements
Rank 1
answered on 08 Oct 2012, 10:37 AM
hi,

I tried with latest telerik build "RadControls_for_WPF_2012_2_1001_DEV_hotfix" but still the same problem. There is no any code for column filter, filtering is a default feature in Gridview control.
0
Yoan
Telerik team
answered on 08 Oct 2012, 12:23 PM
Hello,

The distinct values are shown in a standard ListBox. May I ask you to clarify whether you modified any styles / themes, etc.? Do you have an additional style targeting ListBox defined?

I look forward to hearing from you.

Regards,
Yoan
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Mohamed Hussain Nabhan Hussain
Top achievements
Rank 1
answered on 08 Oct 2012, 12:56 PM
hi,

I removed theme it is working fine with me. Please let me know what other things will effect if i use 3rd party themes in my project?
0
Yoan
Telerik team
answered on 09 Oct 2012, 05:29 AM
Hi,

This depends on what controls are using your theme. For example if your theme has style for a ListBox it will apply for the ListBox in the GridView's Filter and for all others ListBoxes, but this depends on how you define the styles. Please be stick to our documentation.

Regards,
Yoan
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Mohamed Hussain Nabhan Hussain
Top achievements
Rank 1
answered on 05 Nov 2012, 11:50 AM

i am applying a free theme in my application (reuxables Themes) , and this is my code in app.xaml to apply this theme

<Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/ReuxablesLegacy;component/Candy.xaml" />
            </ResourceDictionary.MergedDictionaries>
      <my:String x:Key="MinimizedButtonContent">Opened Documents</my:String>
    </ResourceDictionary>
 
    </Application.Resources>


How do I ovveride the filterControl theme , so that it shows Properly.

if you don't mind can you show us an example.

Best regards

0
Mohamed Hussain Nabhan Hussain
Top achievements
Rank 1
answered on 11 Nov 2012, 12:58 PM
How can i find "PART_DistinctValueList" the grid distincit list from the code behind not from the xaml??
0
Rossen Hristov
Telerik team
answered on 12 Nov 2012, 08:14 AM
Hi,

Even though that approach is not very correct, here is how you can find the listbox:

1. Derive from our default filtering control:

using System;
using System.Linq;
using System.Windows.Controls;
using Telerik.Windows.Controls.GridView;
 
namespace RadGridView_WPF_AR_11
{
    public class FilteringControlEx : FilteringControl
    {
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();
 
            var listBox = this.GetTemplateChild("PART_DistinctValuesList") as ListBox;
 
            if (listBox != null)
            {
                // Do something
            }
        }
    }
}

2. Tell your column(s) to use this new filtering control:

<Window x:Class="RadGridView_WPF_AR_11.MainWindow"
        xmlns:my="clr-namespace:RadGridView_WPF_AR_11"
        Title="MainWindow" Height="700" Width="700">
    <Window.Resources>
        <my:MyViewModel x:Key="MyViewModel"/>
    </Window.Resources>
    <Grid DataContext="{StaticResource MyViewModel}">
        <telerik:RadGridView Grid.Row="0"
                             Name="clubsGrid"
                             ItemsSource="{Binding Clubs}"
                             AutoGenerateColumns="False"
                             Margin="5">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}">
                    <telerik:GridViewDataColumn.FilteringControl>
                        <my:FilteringControlEx />
                    </telerik:GridViewDataColumn.FilteringControl>
                </telerik:GridViewDataColumn>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>
</Window>

I have attached a project.

Greetings,
Rossen Hristov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Asked by
Mohamed Hussain Nabhan Hussain
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Mohamed Hussain Nabhan Hussain
Top achievements
Rank 1
Rossen Hristov
Telerik team
Share this question
or