Unbound with gridview

10 posts, 3 answers
  1. Zack
    Zack avatar
    112 posts
    Member since:
    Jun 2012

    Posted 29 Jul 2011 Link to this post

    Do you have any example of filtering a gridview with an unbound data filter?
  2. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 29 Jul 2011 Link to this post

    Hi Zack,

     
    If you take a look at the following online help article you may see an example using RadDataFilter "Filter RadGridView".  You may also check RadDataFilter's demo directly online, please follow this link. 


    All the best,
    Vanya Pavlova
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Zack
    Zack avatar
    112 posts
    Member since:
    Jun 2012

    Posted 29 Jul 2011 Link to this post

    I was asking for unbound example... the ones you pointed me to are bound.
    I populate the datafilter with a generic object matching the grids object class and after the datafilter is changed I want to programatically change the grids filtering to match the filters in the datafilter.

    Because I have multiple controls filtering the same gridview and I want programmatic control over what filters get applied etc...
  5. Answer
    Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 29 Jul 2011 Link to this post

    Hello Zack,

     
    Have you checked the Unbound Section of RadDataFilter? 


    Best wishes,
    Vanya Pavlova
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  6. Zack
    Zack avatar
    112 posts
    Member since:
    Jun 2012

    Posted 29 Jul 2011 Link to this post

    Perfect thanks.
    I must have totally overlooked that :).
    BTW, the filter is really a great tool!
  7. Zack
    Zack avatar
    112 posts
    Member since:
    Jun 2012

    Posted 11 Apr 2012 Link to this post

    The root operator does not seem to work with the example, if you change it to OR there is no effect.
  8. Answer
    Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 12 Apr 2012 Link to this post

    Hello,

    You will have to attach to the RadDataFilter.FilterDescriptors.PropertyChanged event like this:

    this.radDataFilter1.FilterDescriptors.PropertyChanged += new PropertyChangedEventHandler(FilterDescriptors_PropertyChanged);
     
    void FilterDescriptors_PropertyChanged(object sender, PropertyChangedEventArgs e)
    {
        if (e.PropertyName == "LogicalOperator")
        {
            // I am no sure what you will do here though...
        }
    }

    I hope this helps.

    Kind regards,
    Ross
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  9. Zack
    Zack avatar
    112 posts
    Member since:
    Jun 2012

    Posted 12 Apr 2012 Link to this post

    Not trying to be a smart butt, but if the people who made the grid and datafilter can't tell me what to do to synchronize an unbound filter and grid, I also won't know what to do to handle a property change for the root operator, when I am already affecting the grids filterdescriptors with each collection change of the datafilter. I think the grid is probably the most used control with large amounts of data and the datafilter is a very good data collection filterer so I was hoping for an easier way to sync them up without it having to be completely bound or require many listeners and operations. I was also just pointing out that your documentation that shows how to synchronize unbound datafilter and grid has a flaw (I believe) in that the root operator doesn't work with the illustration in your documentation (which a lot of us rely on for guidance with these controls). In frustration of trying many things with no avail, I went back to binding the grid to the datafilter, which works great by the way, but It just seems very much slower this way because our grid can have thousands of rows and many columns.
  10. Answer
    Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 13 Apr 2012 Link to this post

    Hello,

    That is my mistake. On the PropertyChanged event handler you can change the LogicalOperator of RadGridView by doing this:

    ((CompositeFilterDescriptorCollection)this.radGridView.FilterDescriptors).LogicalOperator = <<the logical operator of the RadDataFilter>>

    I hope this helps.

    Kind regards,
    Ross
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  11. Zack
    Zack avatar
    112 posts
    Member since:
    Jun 2012

    Posted 13 Apr 2012 Link to this post

    Beautiful!
    Thank You

    You should add this to that documentation to save others this trouble.
Back to Top
UI for WPF is Visual Studio 2017 Ready