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

Filtering Process

1 Answer 35 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Philip
Top achievements
Rank 1
Philip asked on 19 Mar 2008, 11:16 PM
Can someone breakdown the actual filtering process for me? Not how to do it, but what actually happens when you filter.

Here is my situation and why I ask. I have a grid that displays a list of requests. Requests are categorized by type and my initial grid display is limited to this type based on a parameter in the url. For example, requests.aspx?queue=In Process.

My code behind picks up the parameter "In Process" and executes a particular SQL string based on this parameter For example, SELECT * where type='In Process'.

So all of this works great except that when someone selects a filter, somehow my original SQL statement is being overridden and it's filtering based on a different SQL string in my code...not the original.

The parameter that is read from the URL string is set to a public variable, so it's readable by all the subs in my code.

Not sure if this makes sense...I'm just trying to track down where in the filtering process it's requerying the database and how it's determining which SQL string to use.

Let me know if you have any ideas. Thanks.

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 24 Mar 2008, 09:47 AM
Hello Philip,

Basically, the control should also honor the parameters set to the datasource, which it is bound to. This is demonstrated in the sample project attached to this message.
Alternatively, you can manipulate the filter expression directly, to combine both the initial filtering criteria, and the one subsequently added. This can be done easily, since the filtering expression of the control is SQL-like - you can append additional criteria to the filtering expression, by using the AND/OR keywords.
I hope this information helps.

Regards,
Yavor
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Philip
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or