When I call the following
/StatusGroups/ my controller code is as follows
public ActionResult GetStatusGroups([DataSourceRequest]DataSourceRequest request)
{
var SLAQuery = new OracleLogic();
return Json(SLAQuery.GetStatusGroupsSLA().ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
}
and I get my populated grid using the following view code.
@(Html.Kendo().Grid<NTC_SLA_System.Models.StatusGroupsSLA>()
.Name("grid")
.Sortable()
.Scrollable()
.Filterable()
.Columns(column =>
{
column.Bound(c => c.TYPE_ID).Title("STGID");
column.Bound(c => c.TYPE_NAME).Title("Group Name");
column.Bound(c => c.INGROUPID).Format("{0:0}").Title("in Group");
column.Bound(c => c.ENTERED_DATE).Format("{0:MM-dd-yyyy}").Title("Created On");
column.Bound(c => c.ENTERED_DATE).Format("{0:MM-dd-yyyy}").Title("Modified Date");
column.Bound(c => c.MODIFY_BY).Title("Modified By");
column.Bound(c => c.TYPE_ID).ClientTemplate("<a class='ntc-blue' href=\"" + Url.Action("ViewType", new { ID = "#=TYPE_ID#" }) + "\">View</a>").Title("Action");
})
.DataSource(dataSource => dataSource
.Ajax()
.Model(model => model.Id(p => p.Id))
.Read(read => read.Action("GetStatusGroups", "StatusGroups"))
.ServerOperation(false)
.PageSize(20))
If I click on View in that Grid I go to /StatusGroups/ViewType/1
My controller code is as follows
public ActionResult ViewType([DataSourceRequest]DataSourceRequest request, string id = null)
{
var SLAQuery = new OracleLogic();
return Json(SLAQuery.GetStatusGroupsViewSLA(id).ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
}
and my view code is
@(Html.Kendo().Grid<NTC_SLA_System.Models.StatusGroupsViewSLA>()
.Name("grid")
.Sortable(sortable => sortable
.AllowUnsort(true)
.SortMode(GridSortMode.MultipleColumn)
.ShowIndexes(true))
.Scrollable()
.Columns(column =>
{
column.Bound(c => c.STATUS_NAME).Template(c => c.STATUS_ID + " - " + c.STATUS_NAME).Title("To Status Name");
column.Bound(c => c.STATUS_ID).Template(@<text>@Html.ActionLink("Remove", "ViewType", new { id = @item.STATUS_ID }) </text>).Title("Action").Sortable(false).HtmlAttributes(new { @class = "center-text" });
})
.DataSource(datasource => datasource
.Ajax()
.Model(model =>
{
model.Field(f => f.STATUS_NAME);
})
.Read(read => read.Action("ViewType", "StatusGroups"))
)
The Grid result is empty no data.
Hi
When I create a new table in the editor and select the value 0 for the cellspacing property in the table tab, the value is not applied to the html.
The next time I open the wizard for the same table, the value for the cellspacing property is blank (as if no value has been set).
Is this by design?
When I paste the html that the wizard produces, into for example https://htmledit.squarefree.com/ the cellspacing=0 is vital to make the table look correct.
This makes it hard to use the html that is produced anywhere else than in the editor.

Hi All, I'm wondering a couple questions. I have a grid and I want it to populate in the middle of the screen and populate to the right while leaving the left side of the screen blank.
I ask this because I saw a option that achieves what I want. I believe it's called Kendo UI splitter. Is their an option like that for MVC Grid?
If their is no option, then what I have done is made a Kendo Menu, on the same page that the grid populates. Problem is the grid is always under the menu, and not to the right. Is their a way to make it be to the right of the menu?

Getting Kendo to work with a Content Security Policy in MVC 5 is not easy and documentation is scarce.
I tried using the NWebSec CSP package from Nuget (5.1.1 https://docs.nwebsec.com/en/aspnet4/index.html) but could not get Kendo to work with the NWebSec <content-Security-Policy> section in Web.config. Even though the CSP looked fine in report-only mode and Kendo Widgets work, as soon as you turn on the CSP, the Widgets fail completely.
I remarked out the <content-Security-Policy> section of the <nwebsec> in Web.config and moved all of my CSP directives back into <httpProtocol> <customHeaders> and Kendo MVC (2018.1.322) now works.
By maintaining NWebSec as part of the project and adding @using NWebsec.Mvc.HttpHeaders.Csp into Views and applying the HTMLHelper into script tags I get an automatically generated nonce for any inline scripts <script @Html.CspScriptNonce() > so it is still valuable to keep NWebSec
script-src 'self' 'unsafe-inline' 'unsafe-eval' kendo.cdn.telerik.com
Hope this is useful for someone else
@(Html.Kendo().LinearGauge() .Name("DivTime") .HtmlAttributes(new { title = "167" }) .Pointers(p => { p.Add().Value(167).Color("#2A5E76").Size(20).Margin(0).Border(b => b.Opacity(100).Width(0)); p.Add().Value(100).Color("#C1D82F").Size(20).Margin(0).Border(b => b.Opacity(100).Width(0)); }) .Transitions(false) .Scale(scale => scale .Vertical(false) .Labels(builder => builder.Visible(false)) .MajorTicks(builder => builder.Visible(false)) .MinorTicks(builder => builder.Visible(false)) .Line(builder => builder.Visible(false)) .MajorUnit(20) .MinorUnit(2) .Min(0) .Max(167) ))Not sure if this is the right place to put this, but I'm currently having issues installing Kendo.Mvc 2015.2.602 from Nuget.
I get the following error:
Could not install package 'Kendo.Mvc 2015.2.602'. You are trying to install this package into a project that targets '.NETFramework, Version=v4.5.2', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
I was under the impression Kendo.Mvc was compatible with .NET 4.5.2. Am I wrong? Is this a bug? When I add the reference manually (by extracting the lib from the .nupkg file) and try to use the HtmlHelpers, I get the error "Cannot Resolve symbol "Kendo" even when @using Kendo.Mvc.UI.
If anyone has any guidance on this, I'd greatly appreciate it.
Michael

Hello,
I am using columns.Select() to make my rows selectable via checkboxes.
I would like to know if it is possible to use the shift key to select multiple rows as in:
1) click the checkbox for the first row to be selected.
2) hold the shift key down
3) click the checkbox for the last row to be selected.
4) programmatically select the entire range of rows between the two selected rows.
Are there any demos that relate to this functionality?
Thanks,
Ryan

When using a grid with selectable and edit inline, if you select a row and edit the selected line, the
font inside cell is white so the text is not visible at all.
Any workaround ?
Is there a way to change the width of the cell border when in editing inline mode. It is a bit thick by default.
Best regards
