This is a migrated thread and some comments may be shown as answers.

Unbound with gridview

9 Answers 54 Views
DataFilter
This is a migrated thread and some comments may be shown as answers.
Guru
Top achievements
Rank 2
Guru asked on 29 Jul 2011, 02:43 PM
Do you have any example of filtering a gridview with an unbound data filter?

9 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 29 Jul 2011, 02:49 PM
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 >>

0
Guru
Top achievements
Rank 2
answered on 29 Jul 2011, 02:58 PM
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...
0
Accepted
Vanya Pavlova
Telerik team
answered on 29 Jul 2011, 03:01 PM
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 >>

0
Guru
Top achievements
Rank 2
answered on 29 Jul 2011, 03:06 PM
Perfect thanks.
I must have totally overlooked that :).
BTW, the filter is really a great tool!
0
Guru
Top achievements
Rank 2
answered on 11 Apr 2012, 09:10 PM
The root operator does not seem to work with the example, if you change it to OR there is no effect.
0
Accepted
Rossen Hristov
Telerik team
answered on 12 Apr 2012, 08:43 AM
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 >>

0
Guru
Top achievements
Rank 2
answered on 12 Apr 2012, 03:52 PM
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.
0
Accepted
Rossen Hristov
Telerik team
answered on 13 Apr 2012, 07:57 AM
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 >>

0
Guru
Top achievements
Rank 2
answered on 13 Apr 2012, 02:18 PM
Beautiful!
Thank You

You should add this to that documentation to save others this trouble.
Tags
DataFilter
Asked by
Guru
Top achievements
Rank 2
Answers by
Vanya Pavlova
Telerik team
Guru
Top achievements
Rank 2
Rossen Hristov
Telerik team
Share this question
or