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

Declarative client-side data-binding WCF Data Service

1 Answer 61 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tarek
Top achievements
Rank 1
Tarek asked on 25 Oct 2013, 06:44 AM
Dear Telerik,
I am using Declarative client-side data-binding for RadGrid with WCF Data Service.
I want to apply an initial filter on data, I know that radgrid filters add "$filter" to the DataService>TableName so if I do TableName="TableName?$filter=ID eq 1" when I apply a grid filter I will have two $filter keyword in the url or i want one $filter and an "and" keyword ..
ex:TableName?$filter=ID eq 1 and name eq 'jhon'

Please don't tell me to use Programmatic Binding because it's time consuming and require a lot of code

Thank you in advance
Tarek


1 Answer, 1 is accepted

Sort by
0
Accepted
Maria Ilieva
Telerik team
answered on 29 Oct 2013, 02:09 PM
Hi Tarek,

You could handle the OnDataBinding client event and apply the filter expression as when below:
http://www.telerik.com/help/aspnet-ajax/grid-client-side-binding-adding-sort-filter-expressions.html

Note that you should firstly cancel the event then apply the filter expressions which will cause the event to fire again.

I hope this helps.

Regards,
Maria Ilieva
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
Tarek
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or