DataMemberBinding with Extended Path Filtering Doens't Work

3 posts, 0 answers
  1. Andie
    Andie avatar
    3 posts
    Member since:
    Nov 2010

    Posted 30 Apr 2013 Link to this post

     I have to GridViewDataColumns in a single grid.  Both have DataMemberBinding set. Both display the information in the grid however filtering does not work on the second one. The only difference betweend the two is one has a long Path than the other. Are there any known bugs with this and is there a work around?

    This one works
       <telerik:GridViewDataColumn Width="75"
                                                        MinWidth="75"
                                                        DataMemberBinding="{Binding Path=PaymentSubTypeDetail.PurchaseBased}"
                                                        Header="%"
                                                        IsFilterable="True"
                                                        IsSortable="True" />

    This one doesn't work
    <telerik:GridViewDataColumn Width="*"
                                                        MinWidth="100"
                                                        DataMemberBinding="{Binding  Path=PaymentSubTypeDetail.ReceiptTicketStyle.Name}"                                                  
                                                        Header="Receipt Style"
                                                        IsFilterable="True"
                                                        IsSortable="True" / >
                           
                   
  2. Andie
    Andie avatar
    3 posts
    Member since:
    Nov 2010

    Posted 30 Apr 2013 Link to this post

    I added  DataType="{x:Type system:String}"
    <telerik:GridViewDataColumn Width="*"
                                                      MinWidth="100"
                                                      DataMemberBinding="{Binding Path=PaymentSubTypeDetail.ReceiptTicketStyle.Name}"
                                                      DataType="{x:Type system:String}"
                                                      Header="Receipt Style"
                                                      IsFilterable="True"
                                                      IsSortable="True"
                                                      Style="{DynamicResource SmallLeftAlignedColumnStyle}"
                                                      x:Uid="telerik:GridViewDataColumn_41" >
  3. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 01 May 2013 Link to this post

    Hello,

    This would be expected if the "PaymentSubTypeDetail.ReceiptTicketStyle.Name" property returns a value of type object. As you cannot filter on type object, you should specify the correct DataType to interpret the data as the correct type (as you have done it).
     

    All the best,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top