FilterMemberType GridView

4 posts, 0 answers
  1. Nuno Oliveira
    Nuno Oliveira avatar
    10 posts
    Member since:
    Jan 2006

    Posted 14 Aug 2012 Link to this post

    Hi,

    When a try to assign a System.String to the FilterMemberType property of a GridViewComboBoxColumn, at runtime it throws the following exception: Failed to create a 'System.Type' from the text 'System.String'

    What am I doing wrong?


    Thanks in advance,

    Nuno
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 15 Aug 2012 Link to this post

    Hi Nuno,

     May I ask you to share how exactly do you assign the FilterMemberType

    Greetings,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. Nuno Oliveira
    Nuno Oliveira avatar
    10 posts
    Member since:
    Jan 2006

    Posted 15 Aug 2012 Link to this post

    Hi Didie,

    I just realized I didn't tell that the assignment was in Xaml. Here's how I'm doing it:

    <telerik:GridViewComboBoxColumn Width="Auto"
                                                            ItemsSourceBinding="{Binding PosicoesPautais, Source={StaticResource RelatedTablesKey} }"
                                                            DisplayMemberPath="Codigo"
                                                            SelectedValueMemberPath="ID"
                                                            IsComboBoxEditable="True"
                                                            IsSortable="True"
                                                            IsFilterable="True"
                                                            FilterMemberPath="Codigo"
                                                            FilterMemberType="System.String"
                                                            DataMemberBinding="{Binding PosicaoPautalID, Mode=TwoWay}"
                                                            Header="Posição Pautal">
                                <telerik:GridViewComboBoxColumn.EditorStyle>
                                    <Style TargetType="telerik:RadComboBox">
                                        <Setter Property="IsReadOnly"
                                                Value="True" />
                                    </Style>
                                </telerik:GridViewComboBoxColumn.EditorStyle>
                            </telerik:GridViewComboBoxColumn>


    Thanks,
    Nuno
  5. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 16 Aug 2012 Link to this post

    Hi,

     You should specify a Type, not s String. Please check the general forums to learn how to set a system type in Xaml.

    Greetings,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top