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

[Solved] Problem in IE when using Partial view

1 Answer 55 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.
D E
Top achievements
Rank 1
D E asked on 11 Jan 2010, 10:00 AM
Hi.
I have a partial view:
<%Html.Grid(Model).Name("Tasks").Columns(
            column =>
                {
                    column.Add(x => x.Status).Width(25);
                    column.Add(x => x.AssignedCompletionDate).Title("Due Date");
                    column.Add(x => Html.ActionLink(x.Task, "TaskDetail", new { taskId = x.Id })).Title("Task");
                })               
                .Pageable()
                .Render();
    %>

I user ajax to render the partial view in a <div>. When I use IE I get the error: Error: Object doesn't support this property or method. In firefox I get no error but, when I try to go to the next page I get something like this :
http://s006.radikal.ru/i213/1001/08/1c705f27a29d.jpg

Thanks!

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 13 Jan 2010, 08:19 AM
Hi D E,

The Microsoft Ajax, used loading partial view, does not evaluate JS and CSS. Hence when the grid is rendered, its scripts are not loaded and the aforementioned error is thrown. Please consider put this code snippet in the end of the body:
...
        <%= Html.Telerik().ScriptRegistrar().DefaultGroup(group => group
                          .Add("telerik.common.js")
                          .Add("telerik.grid.js"))
                          .Add("telerik.grid.filtering.js"))
        %>
</body>
...

The best place will be the end of the master page.

Sincerely yours,
Georgi Krustev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
D E
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or