Apply filter without opening filter pop up

6 posts, 0 answers
  1. Julian
    Julian avatar
    77 posts
    Member since:
    Dec 2010

    Posted 13 Dec 2010 Link to this post

    Hi,

    I'd like to set my custom filter in datagrid with some values without opening filter pop-up.

    As far as I understand for that purpose I have to call somehow method Prepare(GridViewBoundColumnBase gridViewColumn) of my filter to initialize my filter.

    Can you please tell me or better show me, how can I clever handle such situation.

    Thank u in advance,
    Julian 
  2. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 13 Dec 2010 Link to this post

    Hello Julian,

    You can define a ColumnFilterDescriptor in the code and add it to the FilterDescriptors collection of the RadGridView. Thus it will pre-filter the data. You can see this help topic on the matter.

    All the best,
    Veselin Vasilev
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF
  3. UI for WPF is Visual Studio 2017 Ready
  4. Julian
    Julian avatar
    77 posts
    Member since:
    Dec 2010

    Posted 13 Dec 2010 Link to this post

    Could u please provide me with a couple of lines of code ?

    thx.
    Julian

  5. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 13 Dec 2010 Link to this post

    Hi Julian,

    I must have given you a wrong link, please excuse me. The correct one is this:
    http://www.telerik.com/help/wpf/radgridview-filtering-column-filter-descriptors.html

    Attached you can find a sample project.

    Regards,
    Veselin Vasilev
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF
  6. Julian
    Julian avatar
    77 posts
    Member since:
    Dec 2010

    Posted 13 Dec 2010 Link to this post

    Thank you.

    But in my situation I have custom filter control. The implementation of that is located in another file - CustomFilterControl.

    it means that I can't call directly the grid from my control.

    thx.
    Julian
  7. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 13 Dec 2010 Link to this post

    Hello Julian,

    The custom filter control should know about the column it is in. Having the column, you can access the gridview via its DataControl property.

    Regards,
    Veselin Vasilev
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF
Back to Top
UI for WPF is Visual Studio 2017 Ready