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

How to filter a Grid bound to a LinqDataSource

1 Answer 76 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mike Nogen
Top achievements
Rank 1
Mike Nogen asked on 11 Dec 2008, 01:39 PM
Hello!

Using:  2008 Q3 Version Number 2008.3.1125

Is it possible to use the original "out of the box" grid filter function to get the following to work. I´m using 

AllowFilteringByColumn

 

="true"

 


And I want to be able to enter "multiple" Producers into the filter field like 1 <space> 13 to "simulate"  the original T-SQL statement

SELECT     ExportID, Producer
FROM         Export
WHERE     (Producer IN (1, 13))

When I try to enter more than ONE digit into the filter field there will be an error. Everthing is workgin fine if I just filter on one number like 13 and using EqualsTo.

It seems like when I try to manual put the filter expression containing IN on the  

RadGrid1.MasterTableView.FilterExpression


there will be an error. Does anyone know how to use the MasterTableView.FilterExpression feature when bound to an LinqDataSource?


 

1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 15 Dec 2008, 02:51 PM
Hello Mike,

You will need to use LINQ expression as part of the grid's filter expression in order to be recognized and evaluates as expected. Review the following online resources which elaborate on this subject:

http://www.west-wind.com/WebLog/posts/314663.aspx
http://demos.telerik.com/aspnet-ajax/Grid/Examples/Hierarchy/SelfReferencing/DefaultCS.aspx (see the code inside the PageLoad handler)

Best regards,
Sebastian
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Mike Nogen
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Share this question
or