Using Composite Filters question

5 posts, 1 answers
  1. Brendan
    Brendan avatar
    52 posts
    Member since:
    Dec 2011

    Posted 05 Nov 2014 Link to this post

    Based on the example here - http://www.telerik.com/help/winforms/multicolumncombobox-filtering.html
    I cannot get the composite filters to work.  The single filter works fine.

    Based on the code below, once I bind the data to the datasource, the DisplayMember is automatically set to the first column, in this case Account.  The documentation says the data is filtered by the DisplayMember field.  So this works fine for the single column filter.

    For the composite filter, no filtering takes place.  You can see from the attached debug image that the filter is being set correctly.
      > Is it because the DisplayMember is only set to "Account"?
         > Can it be set to something that would work correctly (eg: Account, Description)?

    If the composite filtering does not work, please remove it from the Telerik documentation or detail how to get it to work.  A two column drop down is a pretty simple example.  BTW I am on Winforms v2013.3.1127.40

    Thanks!

    Dim sSql As String = "Select Account, Description From accounts Order By Account"
    cbo.DataSource = tbl
     
    'THIS single filter section works fine
    cbo.AutoFilter = True
    Dim filter As New FilterDescriptor(cbo.DisplayMember, FilterOperator.Contains, "")
    cbo.EditorControl.MasterTemplate.FilterDescriptors.Add(filter)
     
    'THIS composite filter does not work - duplicated from Telerik example
     
    'Dim cmpFilter As New CompositeFilterDescriptor()
    'Dim fltMain As New FilterDescriptor(cbo.DisplayMember, FilterOperator.Contains, "")
    'Dim fltDesc As New FilterDescriptor("Description", FilterOperator.Contains, "")
    'cmpFilter.FilterDescriptors.Add(fltMain)
    'cmpFilter.FilterDescriptors.Add(fltDesc)
    'cmpFilter.LogicalOperator = FilterLogicalOperator.[Or]
    'cbo.EditorControl.FilterDescriptors.Add(cmpFilter)


  2. Answer
    Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 06 Nov 2014 Link to this post

    Hello Brendan,

    Thank you for writing.

    I was not able to reproduce the observed behavior on my end. For convenience I prepared a small sample, based on the information that you provided so far and attached it to this thread. Could you please check it and let me know how it differs from your real setup? 

    Thank you in advance for your patience and cooperation. 

    Regards,
    Dimitar
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Brendan
    Brendan avatar
    52 posts
    Member since:
    Dec 2011

    Posted 06 Nov 2014 in reply to Dimitar Link to this post

    Hi Dimitar,

    I tried the project and had to change the Telerik version from v2014.3.1104.40 to v2013.3.1127.40 since that is what we are currently using.  You can see from the attached image that it doesn't filter, so I am guessing that it was fixed in a more recent Telerik release.

    Do you know if that is the case?  Thanks
  5. Brendan
    Brendan avatar
    52 posts
    Member since:
    Dec 2011

    Posted 06 Nov 2014 in reply to Dimitar Link to this post

    Hi Dimitar, I upgraded my Winforms controls to the latest version and it works as you said.  Sorry for the confusion...
  6. Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 07 Nov 2014 Link to this post

    Hello Brendan,

    Thank you for writing back.

    This functionality was added for the first time in Q2 2014. You can view the item details here:  UI for Winforms Feedback Portal - IMPROVE. Allow filtering by multiple columns in RadMultiColumnComboBox using CompositeFilterDescriptors

    Do not hesitate to contact us if you have other questions.

    Regards,
    Dimitar
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for WinForms is Visual Studio 2017 Ready