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

Client Functionality Not Working with RenderAction

1 Answer 58 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.
Shane
Top achievements
Rank 1
Shane asked on 25 May 2011, 07:13 PM
From my main screen, I'm calling RenderAction to render a grid. In this scenario, none of the client events (sorting, refreshing, grouping) is working properly. As soon as I click a column to reorder, the rest of the page and all styling disappears. When I render the grid directly on the page (without the RenderAction) it works fine. I have tried manually registering the grid's javascript files to no avail. What am I missing? Thanks!

Main screen:
@{ Html.RenderAction("List", "Department", new {agencyId = Model.ID}); }

Partial View:
@(Html.Telerik().Grid(Model)
.Name("DepartmentList")
.DataKeys(keys => keys.Add(r => r.ID))
.Columns(columns =>
{
    columns.Bound(r => r.ID).Title("Dept ID");
    columns.Bound(r => r.Name);
    columns.Bound(r => r.Location);
    columns.Bound(r => r.Municipality);
    columns.Bound(r => r.FirstPhone);
    columns.Bound(r => r.ID).Title("View").Format(Html.ActionLink("View", "Detail", "Department", new { id = "{0}" }, null).ToHtmlString()).Encoded(false);
})
.Sortable())

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 26 May 2011, 06:51 AM
Hi Shane,

 You are probably missing a ScriptRegistrar which outputs the JavaScript files required by the grid as well as its client-side initialization script.

 Make sure the view which you are calling has a ScriptRegistrar defined.

 If you still have troubles configuring the grid please attach a sample project so we can check it out.

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
Tags
Grid
Asked by
Shane
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or