This question is locked. New answers and comments are not allowed.
I just started using the telerik MVC controls (extensions) today and am pleased how fast I was up and running.
One small issue that I am having however is my grid does not filter. Here are some quick code snippets of how I am setup:
VIEW
in Site.Master I have:
basically, the filter images show up, but are not clickable. I did notice the following javascript error on the page:
Message: 'fx' is null or not an object
Line: 3
Char: 5
Code: 0
URI: http://aspnet-scripts.telerikstatic.com/mvcz/2010.1.309/telerik.examples.min.js
so i did some googlin and came across this thread which said to put
<%= Html.Telerik().ScriptRegistrar() %>
on each page, but when I add that to my view, I get a "You cannot call render more than once" error
I have a feeling I am close to the correct solution, but I've exhausted my own intellectual prowess at this point.
One small issue that I am having however is my grid does not filter. Here are some quick code snippets of how I am setup:
VIEW
| <% Html.Telerik().Grid(Model) |
| .Name("Grid") |
| .ToolBar(commands => |
| { |
| if (Html.IsAuthenticated()) |
| { |
| commands.Custom().Text("Add Record").Action("Create", "Asset"); |
| } |
| }) |
| .DataKeys(keys => keys.Add(asset => asset.Id)) |
| .DataBinding(dataBinding => dataBinding.Server()) |
| .Columns(columns => |
| { |
| if (Html.IsAuthenticated()) |
| { |
| columns.Template(asset => |
| {%> |
| <a href="<%= Url.Action("Edit", "Asset", new {id = asset.Id}) %>">Edit</a> |
| <%}); |
| } |
| columns.Bound(a => a.AnotherProperty); |
| /* remaining fields omitted */ |
| }) |
| .Sortable() |
| .Pageable() |
| .Filterable() |
| .Render(); |
| %> |
in Site.Master I have:
| <% Html.Telerik().ScriptRegistrar() |
| .DefaultGroup(group => group |
| .Add("telerik.examples.js") |
| .Compress(true) |
| .UseTelerikContentDeliveryNetwork(true)) |
| .OnDocumentReady(() =>{ %>prettyPrint();<% }).Render(); %> |
basically, the filter images show up, but are not clickable. I did notice the following javascript error on the page:
Message: 'fx' is null or not an object
Line: 3
Char: 5
Code: 0
URI: http://aspnet-scripts.telerikstatic.com/mvcz/2010.1.309/telerik.examples.min.js
so i did some googlin and came across this thread which said to put
<%= Html.Telerik().ScriptRegistrar() %>
on each page, but when I add that to my view, I get a "You cannot call render more than once" error
I have a feeling I am close to the correct solution, but I've exhausted my own intellectual prowess at this point.