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

Filter with database values

1 Answer 83 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Arnie Vargas
Top achievements
Rank 1
Arnie Vargas asked on 12 Jan 2012, 08:41 PM
Is there a way to populate radgrid filters with values from a database table instead of the default conditions(contains, equalsto, etc)?

Thanks,
arnie

1 Answer, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
answered on 16 Jan 2012, 03:23 PM
Arnie:

I have not done this, but take a look at the Custom Option for Filtering (FilterListOptions -> VaryByDataTypeAllowCustom) documentation page. It appears that you should be able to manipulate/override the default filter options using LINQ.

See the note at the bottom:
"With the .NET 3.5 build of RadGrid for ASP.NET AJAX and LINQ filter expressions enabled (EnableLinqExpressions = true), the filter expressions set for the grid either internally by its filtering mechanism or manually in code should conform to the LINQ expression syntax instead of the old T-SQL syntax. Only thus they will be evaluated properly by the control."

Hope this helps!
Tags
Grid
Asked by
Arnie Vargas
Top achievements
Rank 1
Answers by
Richard
Top achievements
Rank 1
Share this question
or