This question is locked. New answers and comments are not allowed.
Hello,
Currently in my project I the default ASP.NET MVC 2.0 web project setup with an Area which has its own Views and Controllers. In my project I have the Telerik scripts in a root level "Scripts" folder and the css in a root level "Content" folder. Currently I am trying to create a grid with a selectable property. This works in the root level of the project, however, within the area I created (not at the root level) the properties for the grids do not work, but the grid displays correctly.
The code in the root level views are as follows:
This works fine and provides a row selectable grid.
In my area view, the following is the code I'm using:
This renders a grid which is unselectable, thus I tried to change the two last lines to the following
However it still fails to allow me to set the selectable property on the grid which is located in the area.
The Site.Master has the following code as well, and both of the two views in question have reference to it as the masterpagefile
I would like to be able to make a grid selectable in an area of my MVC 2.0 project. I do not understand why my code is not functional.
Any assistance on this matter to resolve the issue would be greatly appreciated. Thanks.
Currently in my project I the default ASP.NET MVC 2.0 web project setup with an Area which has its own Views and Controllers. In my project I have the Telerik scripts in a root level "Scripts" folder and the css in a root level "Content" folder. Currently I am trying to create a grid with a selectable property. This works in the root level of the project, however, within the area I created (not at the root level) the properties for the grids do not work, but the grid displays correctly.
The code in the root level views are as follows:
<% Html.Telerik().Grid<Job>() .Name("JobGrid") .BindTo((IEnumerable<Job>)ViewData["Jobs"]) .DataKeys(keys => keys.Add(j => j.JobId)) .Columns(columns => { columns.Bound(j => j.JobId).Hidden(true); columns.Bound(j => j.Status).Width(8); }) .Selectable() .Render(); %> <%= Html.Telerik().ScriptRegistrar()%>This works fine and provides a row selectable grid.
In my area view, the following is the code I'm using:
<% Html.Telerik().Grid<Ability>().Name("Role Abilities Grid").BindTo((IEnumerable<Ability>) Model) .DataKeys(k => k.Add(a => a.AbilityId)) .Columns(cols => { cols.Bound(a => a.AbilityId).Width(45); }) .Selectable() .Render(); %> <%= Html.Telerik().ScriptRegistrar() %> <%= Html.Telerik().StyleSheetRegistrar() %>This renders a grid which is unselectable, thus I tried to change the two last lines to the following
<%= Html.Telerik().ScriptRegistrar().Scripts( scripts => scripts.AddGroup("CommonScript", group => group.Add("~/Scripts/2010.2.825/telerik.grid.editing.min.js") .Add("~/Scripts/2010.2.825/telerik.grid.filtering.min.js") .Add("~/Scripts/2010.2.825/telerik.grid.grouping.min.js") .Add("~/Scripts/2010.2.825/telerik.grid.resizing.min.js") .Add("~/Scripts/2010.2.825/telerik.grid.min.js") .Combined(true))) %> <%= Html.Telerik().StyleSheetRegistrar().StyleSheets( css => css.AddGroup("CommonCSS", group => group.Add("~/Content/2010.2.825/telerik.common.min.css").Combined(true)))However it still fails to allow me to set the selectable property on the grid which is located in the area.
The Site.Master has the following code as well, and both of the two views in question have reference to it as the masterpagefile
<%= Html.Telerik().StyleSheetRegistrar() .DefaultGroup(group => group .Add("telerik.telerik.css") .Add("telerik.common.css") .Combined(true) .Compress(true)) %>I would like to be able to make a grid selectable in an area of my MVC 2.0 project. I do not understand why my code is not functional.
Any assistance on this matter to resolve the issue would be greatly appreciated. Thanks.