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

[Solved] Paging in partial view

5 Answers 180 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.
Scarruthers
Top achievements
Rank 1
Scarruthers asked on 24 Nov 2010, 01:37 PM
Hello,

We've been trying to use a grid (bound with ajax) within a partial view which is in-turn contained inside another view. However, we can't seem to get the grid paging to work correctly. On grid page change, the ajax binding event is being called, but we then get a 500 - internal server error. We've only just started with MVC so any help on this is much appreciated.

Regards,
Steven

5 Answers, 1 is accepted

Sort by
0
Alex
Top achievements
Rank 1
answered on 21 Mar 2011, 04:04 PM
Hi,

I have had exactly the same issue with something im working on. I through it was the way I was using Ajax to call the partial view and I have made some changes there to try and fix the issue. Have you had any luck with the issue since then?

Alex
0
Alex
Top achievements
Rank 1
answered on 21 Mar 2011, 04:29 PM
Hi All,

If you place the grid telerik.grid.min.js in the script register the partial view has started working with paging and other functions. 

Alex
0
frederic rybkowski
Top achievements
Rank 1
answered on 21 Mar 2011, 06:29 PM
Hi all,

Personally, i insert all the stuff related to telerik in the master page.

in the head :

<%= Html.Telerik().StyleSheetRegistrar()
        .DefaultGroup(group => group
            .Add("telerik.common.css")
            .Add("telerik.Office2007.css")           
        )
%>

and at the end of the body :

<% Html.Telerik()
    .ScriptRegistrar().Globalization(true)
     .Scripts(scripts => scripts.AddGroup("PageScripts", group => group
            .Add("~/Scripts/MicrosoftAjax.js")
            .Add("~/Scripts/MicrosoftMvcAjax.js")
            .Add("~/Scripts/MicrosoftMvcValidation.js")
 
            .Add("telerik.common.js")
            .Add("telerik.draganddrop.js")
            .Add("telerik.grid.js")
            .Add("telerik.grid.filtering.js")
            .Add("telerik.grid.editing.js")
            .Add("telerik.calendar.js")
            .Add("telerik.grid.grouping.js")
            .Add("telerik.datepicker.js")
            .Add("telerik.textbox.js")
            .Add("telerik.tabstrip.js")              
            .Add("~/Scripts/Site.js")
            ))
    .Render();
%>

- Frédéric
0
Henry
Top achievements
Rank 1
answered on 25 Mar 2011, 12:52 PM
Sometimes referencing the scripts inside a master is not enough. When using partial views if you have problems you may need to include the JavaScript files inside the partial view its self.
0
Fethi TOUMI
Top achievements
Rank 1
answered on 26 Mar 2011, 10:03 PM
Hi,

500 - internal server error may be due to EF and cyclic reference. Try to use DTO object or delete cyclic reference in your object model.

Hope that helps.

Fethi
Tags
Grid
Asked by
Scarruthers
Top achievements
Rank 1
Answers by
Alex
Top achievements
Rank 1
frederic rybkowski
Top achievements
Rank 1
Henry
Top achievements
Rank 1
Fethi TOUMI
Top achievements
Rank 1
Share this question
or