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

GridViewComboBoxColumn filtering

7 Answers 45 Views
GridView
This is a migrated thread and some comments may be shown as answers.
ZooY
Top achievements
Rank 1
ZooY asked on 28 Dec 2011, 01:49 PM
// App.xaml.cs
public partial class App : Application
{
    public Dictionary<int, string> AgreementCategoryPicklist { get; set; }
}

/* XAML */
 
<UserControl.Resources>
    <MySilverlightApplication:App x:Key="CurrentApplication" />
</UserControl.Resources>
 
...
 
<telerik:RadGridView
    Name="MappedDataGrid"
    AutoGenerateColumns="False"
    ItemsSource="{Binding Data}">
        
    <telerik:RadGridView.Columns>
     
        <telerik:GridViewComboBoxColumn
            Header="Категория"
            IsFilterable="True"
            IsCustomSortingEnabled="True"
            IsFilteringDeferred="True"
            ShowDistinctFilters="True"
            ShowFieldFilters="True"
            ShowFilterButton="True"
            DataMemberBinding="{Binding Path=[agreement_new_agreement_category_confirmedcode], Mode=TwoWay}"
            ItemsSourceBinding="{Binding Path=AgreementCategoryPicklist, Source={StaticResource CurrentApplication}}"
            DisplayMemberPath="Value"
            SelectedValueMemberPath="Key"
            UniqueName="AgreementCategory" />
         
    </telerik:RadGridView.Columns>
</telerik:RadGridView>

// Code-behind
 
((App)Application.Current).AgreementCategoryPicklist = result.Metadata.AgreementCategoryPicklist;
MappedDataGrid.ItemsSource = result.Data;

For the GridViewComboBoxColumn column filter not display. I can not understand why, what am I doing wrong?

7 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 28 Dec 2011, 02:34 PM
Hello Roman,

 Does your column filter not show at all?  Generally when you set the ItemsSource of the GridViewComboBoxColumn, the display values from this source will be displayed in the filtering control.

I have noticed that you use ItemsSourceBindnig. Due to the specifics of ItemsSourceBinding, the filtering control will again display the properties from the source of the grid, not the displayed values. 

Regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
ZooY
Top achievements
Rank 1
answered on 28 Dec 2011, 05:25 PM
If I use the ItemsSource I get an empty list.
In other fields, filters are working correct. Problems with only GridViewComboBoxColumn 
0
Dimitrina
Telerik team
answered on 29 Dec 2011, 10:57 AM
Hi Roman,

Have you set the right source for the ItemsSource binding? Could you please check if the reason for the empty cells is the one mentioned in this troubleshooting article

Regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
ZooY
Top achievements
Rank 1
answered on 29 Dec 2011, 11:36 AM

When I use this line

ItemsSourceBinding="{Binding Path=AgreementCategoryPicklist, Source={StaticResource CurrentApplication}}"

I get correct listbox, but I do not see the filter

When I use this line

ItemsSource="{Binding Path=AgreementCategoryPicklist, Source={StaticResource CurrentApplication}}"

I do not get listbox
Оther parameters I do not change.

List source is a StaticResource as stated in troubleshooting article.

0
Dimitrina
Telerik team
answered on 29 Dec 2011, 01:03 PM
Hi Roman,

 Does any Keys of the bound "AgreementCategoryPicklist " correspond to the "agreement_new_agreement_category_confirmedcode" per each item in the GridView? 

Kind regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
ZooY
Top achievements
Rank 1
answered on 29 Dec 2011, 01:38 PM
Yes, all the keys "agreementtsategorypitsklist" correspond to the field "agreement_new_agreement_category_confirmedcode" and when the list is displayed, the desired value is selected.
0
Dimitrina
Telerik team
answered on 29 Dec 2011, 01:59 PM
Hello Roman,

 This is strange, at my end this scenario works fine. Would it be possible for you to prepared for us a small repro produce that we can debug at our end?

Kind regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
ZooY
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
ZooY
Top achievements
Rank 1
Share this question
or