This is a migrated thread and some comments may be shown as answers.
Sorting a grid in partialview
3 Answers 35 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Guillaume
Top achievements
Rank 1
Guillaume asked on 25 Feb 2010, 11:00 AM
Hi,

This is my setup :
- i have an Ajax.BeginForm containing a textbox and a search button.
- I have a partial view "SearchResults" containing my grid
- when clicking on the button, I calling the search action on my home controller, which binds, and then use return PartialView("SearchResult",MyModel) to display the grid in the div set in the ajaxoptions

That works.

But, when I try to sort (or group, or use the pager), since the action is Home/Search , my partialview "SearchResults" is used for the whole page (I'm not on my master page anymore, just on the partial view)

I'm sure I'm doing something wrong (I'm still a beginner in MVC)

Thanks !

3 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 25 Feb 2010, 03:16 PM
Hi Guillaume JAY,

You can check this forum thread. There is a sample application attached which I think will help you achieve your goal.

Regards,
Atanas Korchev
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
Guillaume
Top achievements
Rank 1
answered on 25 Feb 2010, 03:38 PM
I already found this post, but, it's not exactly my problem (I'm not getting the json data, i'm getting my view), and also, I can't open it :(


I'm getting this error :
The project type is not supported by this installation.

(I'm getting the same error when I try to open MVC futures' samples )

Anyway, I'm going to look at it.
0
Guillaume
Top achievements
Rank 1
answered on 25 Feb 2010, 03:47 PM
And it... works !

Just by adding the oncomplete javascript.

(I think you should add this to the documentation)

Thanks a lot for your skill and speed !

(If you could just explain why I can't open the project.. or is it as MVC 1 project ? Same for the samples ?)

[EDIT] JFI :
I'm wondering if the "Can't load project type" error is not related to some security policy. At home, I can open the projects with just a warning ("This project can modify your setup, yes/no?" more or less), at work  I just get the project type error.
Tags
Grid
Asked by
Guillaume
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Guillaume
Top achievements
Rank 1
Share this question
or