8 Answers, 1 is accepted
0
Hi,
Vanya Pavlova
the Telerik team
You can call ToString() for the grid FilterDescriptors. Generated SQL can be observed server-side from your LINQ provider.
All the best,Vanya Pavlova
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
0

scott
Top achievements
Rank 1
answered on 28 Jul 2010, 01:33 PM
Hi Vanya. I'm googling around trying to find out what this means: "Generated SQL can be observed server-side from your LINQ provider." ... can you give me a hint ?
Many thanks -
Scott
foreach (ColumnFilterDescriptor fd in fpGrid.FilterDescriptors)
{
string s = fd.ToString();
// what comes next ?
}
Many thanks -
Scott
0
Hello scott,
Sincerely yours,
Milan
the Telerik team
Could you please give us more details about the end result that you are trying to archive? Why do you need to access your filtering expressions?
Sincerely yours,
Milan
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
0

scott
Top achievements
Rank 1
answered on 28 Jul 2010, 02:30 PM
Hi Milan. Those filters are going to become part of an SQL select statement's where clause downstream. There is code elsewhere that wants to do:
string sql = "select ... from ... where ... AND " + the stuff from the filters.
Scott
string sql = "select ... from ... where ... AND " + the stuff from the filters.
Scott
0
Hi,
Vlad
the Telerik team
Usually in Silverlight (for example WCF RIA Services binding) RadGridView filters will generate LINQ expressions and these expressions will be transfered to the server-side using service where the same LINQ expressions will be applied to some LINQ context like LINQ to SQL, Entity Framework, Open Access, etc. and this LINQ context will translate the expressions to SQL.
Best wishes,Vlad
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
0

scott
Top achievements
Rank 1
answered on 28 Jul 2010, 04:02 PM
I can look at the filter expressions themselves and write a parser that emits the stuff in the proper SQL syntax for each filter operator ... yuck ... Can you think of a way to create a dummy linq to sql context that I can query for the SQL ?
Scott
Scott
0
Hi,
Vlad
the Telerik team
You check this blog post - may help you in your case.
Greetings,Vlad
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
0

scott
Top achievements
Rank 1
answered on 28 Jul 2010, 05:35 PM
Hi Vlad. That blog post was way over my head. I'd much rather see FilterDescriptor.ToSQL() implemented... Thanks though :)