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

[Solved] ajax, custombinding, n-tier

2 Answers 21 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sebastian
Top achievements
Rank 1
Sebastian asked on 28 Sep 2011, 04:02 PM
Hello Telerik support team.

I have an application that uses n-tier pattern and for presentation I use ASP.NET MVC3. We, as company, are interested in your MVC Extension components but we have a problem with a grid. I set up a page with grid, applied filtering, sorting, paging and custom binding via ajax. It all worked fine but then I wanted to move the code that queries data from DB to other application layer (outside MVC project) and I noticed that custom binding requires me to use GridCommand class a an input to the data request. GridCommand keeps information about filtering as a method that takes and returns an Exppression object which is not what I want in other layer. Also I cannot use GridCommand class directly in bussines logic layer because it will require reference to some Telerik UI dll which is not acceptable.

So my question is: is there a way to change the behaviour of your grid that it uses simplier method of transfering filtering, grouping and sorting data (i.e. in a string format?) or can you provide any other solution to my problem?

Thanks in advance.
Sebastian.

2 Answers, 1 is accepted

Sort by
0
Accepted
Rosen
Telerik team
answered on 29 Sep 2011, 10:31 AM
Hello Sebastian,

In order to get the not parsed filtering/sorting/grouping expression you may use GridRouteValuesextension method.
Another approach will be to project the descriptors values from GridCommand instance to some custom object which more closely match your project and architecture requirements. 

All the best,
Rosen
the Telerik team
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 Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Sebastian
Top achievements
Rank 1
answered on 29 Sep 2011, 11:50 AM
Thank you for the support.
We are going to try these solutions.

Best regards,
Sebastian
Tags
Grid
Asked by
Sebastian
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Sebastian
Top achievements
Rank 1
Share this question
or