GridViewComboBoxColumn filtering

8 posts, 0 answers
  1. ZooY
    ZooY avatar
    11 posts
    Member since:
    Nov 2011

    Posted 28 Dec 2011 Link to this post

    // 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?
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 28 Dec 2011 Link to this post

    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 >>

  3. ZooY
    ZooY avatar
    11 posts
    Member since:
    Nov 2011

    Posted 28 Dec 2011 Link to this post

    If I use the ItemsSource I get an empty list.
    In other fields, filters are working correct. Problems with only GridViewComboBoxColumn 
  4. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 29 Dec 2011 Link to this post

    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 >>

  5. ZooY
    ZooY avatar
    11 posts
    Member since:
    Nov 2011

    Posted 29 Dec 2011 Link to this post

    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.

  6. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 29 Dec 2011 Link to this post

    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 >>

  7. ZooY
    ZooY avatar
    11 posts
    Member since:
    Nov 2011

    Posted 29 Dec 2011 Link to this post

    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.
  8. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 29 Dec 2011 Link to this post

    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 >>

Back to Top