This question is locked. New answers and comments are not allowed.
Hi.
I'm trying to create a view that contains a tabstrip with several tabs... In one (or several) of them I need to put ajax enabled grids. The code should be something like this:
| .Items(items => |
| { |
| items.Add() |
| .Text("Datos") |
| .LoadContentFrom("_obtenerTabDatos", "Local"); |
| items.Add() |
| .Text("Parque") |
| .LoadContentFrom("_obtenerTabParque", "Local"); ...... etc... |
and the partial view with the ajax grid looks like this:
| <div id="panelInferior" style="width:100%"> |
| <%= Html.Telerik().Grid<ContactoViewModel.ContactoVM>() |
| .Name("LookupLocales") |
| .DataBinding(databind => databind.Ajax().Select("_obtenerGridContactos", "Local")) |
| .Columns(columns => |
| { |
| columns.Bound(o => o.Valor).Title("Local"); |
| }) |
| .Sortable() |
| .Pageable(action => action.PageSize(10)) |
| .Filterable() |
| .Selectable() |
| %> |
| </div> |
When I browse to this view... I get a javascript error in the first lines of the view but not in the javascript code (I suppose that something breaks in the ajax loaded code and the browser doesn't show it)
I've found a post where you tell someone that TabStrips are using MS Ajax and not jSon, and that this makes it ignore javascript and css... and that a possible solution is to register the grid scripts with ScriptRegistrar at the master page like this:
<%= Html.Telerik().ScriptRegistrar() .DefaultGroup(group => group .Add("telerik.grid.js") .Add("telerik.grid.filtering.js")) %>
I've also tried this and I get an error while loading the master page:
| (function(b){var a=b.telerik;var c=/"\\\/Date\((.*?)\)\\\/"/g;a.grid=function(g,h){this.element=g;this.sorted=[];this.groups...... blah blah blah |
This is the "telerik.grid.min.js" file and I get the error "undefined is null or not an object" at the "a.grid" point..
Can you give me any help on this, please?
Thanks!!
PS: BTW, I'm using Teleric Q1 2010 MVC 2 controls.