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

Filter on database side / Filter on a template column

1 Answer 74 Views
Filter
This is a migrated thread and some comments may be shown as answers.
mike
Top achievements
Rank 1
mike asked on 08 Jul 2010, 04:17 PM
I have a couple general questions about the RadFilter that I couldn't find answers to here in the Forum or in the samples.

1.  Is there a way to pass the filter expression created with a RadFilter to the database query so that filtering can be done on the database side?
2.  Can RadFilter be used to filter a RadGrid template column where there are multiple pieces of data?  For example I have a template column with 2 pieces of data, Order ID and Order Date, and would like to be able to filter on both.

Any comments or samples would be appreciated.

Thank you,
Mike

1 Answer, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 14 Jul 2010, 09:09 AM
Hello Mike,

To your questions:
1. If you RadGrid is bound to LinqDataSource/EntityDataSource filter expressions will be applied on DB server, otherwise you can use RadFilterSqlQueryProvider to build the expressions and apply them manually on your DB.

2. When you are using RadFilter integration with RadGrid(i.e. FilterContainerID is set to RadGrid), RadFilter will retrieve DataField from GridTemplateColumn. Thus to  have this fields visible in RadFilter context menu you must have other columns with such DataField's.
Other option is to use filtering against DataSourceControl (http://demos.telerik.com/aspnet-ajax/filter/examples/datasourceintegration/defaultcs.aspx) or to not set FilterContainerID and manually define FieldEditors collection and manually apply the expressions later.

Greetings,
Nikolay
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Filter
Asked by
mike
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or