Hi, I wanted to ask how I could get html displayed in a grid cell via a Client Template to line up with the left side of the grid. I've played around with some css but nothing I'm doing seems to work. I've include a screenshot of what's happening and below is an example of my code.
function getAlarmTypes(typesArray) { var allTypes = "" typesArray.forEach(function (element) { allTypes += "<li><strong>" + element.optionDesc.trim() + "</strong></li>" value = element.gcfDataValue if ((value & 1) == 1) { //bit 0 allTypes += "<li>Shutdown</li>" } if ((value & 2) == 2) { //bit 1 allTypes += "<li>Fault</li>" } if ((value & 4) == 4) { //bit 2 allTypes += "<li>Non-Latching</li>" } if ((value & 8) == 8) { //bit 3 allTypes += "<li>Sequence Controlled</li>" } if ((value & 16) == 16) { //bit 4 allTypes += "<li>Autocrossover</li>" } if ((value & 32) == 32) { //bit 5 allTypes += "<li>RBS Shutdown</li>" } if ((value & 64) == 64) { //bit 6 allTypes += "<li>Run Responce</li>" } }); return ("<class=\"analogType\"><ul style=\"list-style-type:none; left:-50px\">" + allTypes + "</ul></class>").trim()}
Hi.
I've been trying for so long time to understand how to adjust an aggregate inside of a grid, but I think I cannot to do this because of missing a documentation that could be helpful. I am not sure if it's possible for the actual moment or not, but I am trying to create an aggregate sum my columns ( Price/Quantity).
Any advice on how to do this?
<kendo-grid name="PartData" auto-bind="true"> <datasource type="DataSourceTagHelperType.Custom" server-filtering="true" server-sorting="true"> <transport> <read url="@Url.Action("OrderLines_Read", "Order", new { id = Model.Number })" /> </transport> <aggregates> <aggregate field="Total" aggregate="sum"/> <aggregate field="ReservedAmount" aggregate="sum"/> </aggregates> </datasource> <columns> <column field="TotalPrice" title=" " hidden="true" html-attributes='new Dictionary<string, object> { ["class"] = "visible-xs-block" }' footer-template="<div>Total: #= sum #</div>" template="#=mobileTemplate(data)#"></column> <column field="PartNumber" title="Part Number" min-screen-width="767"></column> <column field="PartName" title="Name" min-resizable-width="767"></column> <column field="ReservedAmount" title="Quantity" footer-template="<div> #= sum #</div>" width="100" min-screen-width="767"></column> <column field="TotalPrice" title="Price" footer-template="<div> #= sum #</div>" width="100" min-screen-width="767"></column> </columns></kendo-grid>
Thanks in advance
BTW, my an actual version of the library that I use - 2018.2.530
I have the following configuration of the Grid:
<kendo-grid name="grid">
<datasource type="DataSourceTagHelperType.Custom" page-size="5">
<transport>
<read url="https://thefishroommvccore.azurewebsites.net/api/PageContents" />
<destroy url="https://thefishroommvccore.azurewebsites.net/api/PageContents/7" />
</transport>
<schema>
<model id="Id">
<fields>
<field name="Name" type="text"></field>
<field name="Content" type="text"></field>
<field name="PublishDateTime" type="date"></field>
</fields>
</model>
<model>
<fields>
<field name="PublishDateTime" type="Date"></field>
</fields>
</model>
</schema>
</datasource>
<groupable enabled="true" />
<sortable enabled="true" />
<pageable button-count="5" refresh="true" page-sizes="new int[] { 5, 10, 20 }">
</pageable>
<filterable enabled="true" />
<columns>
<column field="Name" title="Name" width="240" />
<column field="Content" title="Content" width="240" />
<column field="PublishDateTime" title="Date" format="{0:MM/dd/yyyy}" />
<column field="Id" title="Id" width="150" />
<column title="Edit">
<commands>
<column-command name="edit"></column-command>
<column-command name="delete" name="destroy"></column-command>
</commands>
</column>
</columns>
</kendo-grid>
I can view sort all works... the one thing I cannot get to work is the delete which I have hard coded right now to delete record with Id of 7. I'm following the docs at: https://docs.telerik.com/aspnet-core/helpers/tag-helpers/grid
Right now Delete is doing nothing... no errors in page nothing. I don't understand what it is I need to do to delete a record. The service is just a Web Api with Crud. I can do Crud operations in Postman no problem.

Hi, I'm currently trying to filter a grid using an external component like the dropdown menu. I've used the instructions found in this form thread.
How would I pass the name of the drop down menu as well as the id or text data associated with the selection.
For example here is my current code:
Javascript
<script> var menuName var menuItem function additionalData(e) { return { item: menuName + " " + menuItem } } function onChange(e) { //What would I put here to get the name or id of the dropdown? id, name, &ct.toString() do not work menuName = this.name() menuItem = this.text() var grid = $("#analogGrid").data("kendoGrid") grid.dataSource.read() }</script>
Grid HTMLHelper
//....Read(read => read.Action("Analogs_ReadAsync", "Analogs").Data("additionalData"))//...
Controller Action
public async Task<JsonResult> Analogs_ReadAsync([DataSourceRequest]DataSourceRequest request, string item) {...}
Telerik.Web.UI 2017.3.913.40
Telerik.Web.UI.Skins 2017.3.913.40
Telerik.Windows.Documents.Core 2015.3.1111.40
Telerik.Windows.Documents.Flow 2015.3.1111.40
Telerik.Windows.Documents.Spreadsheet 2015.3.1111.40
Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml 2015.3.1111.40
Telerik.Windows.Maths 2015.3.1111.40
Telerik.Windows.Zip 2015.3.1111.40

Hi, I'm currently trying to filter a grid using an external component like the dropdown menu. I've used the instructions found in this form thread.
How would I pass the name of the drop down menu as well as the id or text data associated with the selection.
For example here is my current code:
Javascript
<script> var menuName var menuItem function additionalData(e) { return { item: menuName + " " + menuItem } } function onChange(e) { //What would I put here to get the name or id of the dropdown? id, name, &ct.toString() do not work
menuName = this.name() menuItem = this.text() var grid = $("#analogGrid").data("kendoGrid") grid.dataSource.read() }</script>
Grid HTMLHelper
//....Read(read => read.Action("Analogs_ReadAsync", "Analogs").Data("additionalData"))//...
Controller Action
public async Task<JsonResult> Analogs_ReadAsync([DataSourceRequest]DataSourceRequest request, string item) {...}
I have the following code:
.Columns(columns => { columns.Bound(c => c.CreatedDateTime).Width(180).Format("{0: dd MMM yyyy HH.mm}").Title("Date"); columns.Bound(c => c.Action.ActionDateTime).Format("{0: dd MMM yyyy HH.mm}").Width(280).Title("Action Date");})
Both columns show the date and the JSON seems to have both dates correctly passed through.
However the 1st one displays the date correctly and the second one does not.
1st DateTime: 01 May 2018 08.45
2nd DateTime: 2018-06-01T13:01:05
Further details:
The data is obtained from two joined tables using EF Core.
I had to add the Json option Referenceloophandling.ignore to get the data to pass through, though I doubt this has anything to do with the problem as the Telerik Grid obviously has the correct data.
Can someone please help me format this date correctly.
Thanks,
Ricky

I am trying to use unobtrusive validation for an ajax form inside a window. However if the window is opened multiple times then closed the validation fires multiple times. If I move the script to the main page then the validation does not fire at all.
Where should I place the validation script and how do I get it to fire only once?
@model MyProject.Models.Input@{ Layout = null;}<script src="~/lib/jquery-validation/dist/jquery.validate.js"></script><script src="~/lib/jquery-validation-unobtrusive/dist/jquery.validate.unobtrusive.js"></script><script src="~/lib/jquery.unobtrusive-ajax/dist/jquery.unobtrusive-ajax.js"></script>@*<form asp-controller="Home" asp-action="Edit" data-ajax-begin="onBegin" data-ajax-complete="onComplete" data-ajax-failure="onFailed" data-ajax-success="onSuccess" data-ajax="true" data-ajax-method="POST">*@<form asp-controller="Input" asp-action="Edit" data-ajax-complete="onComplete" data-ajax-failure="onFailed" data-ajax-success="onSuccess" data-ajax="true" data-ajax-method="POST"> <input type="hidden" asp-for="InputID" /> <input type="hidden" asp-for="TemplateID" /> <label asp-for="Input" class=""></label> <input asp-for="Input" autocomplete="off" class="k-textbox" /> <br /> <label asp-for="Description" class=""></label> <input asp-for="Description" autocomplete="off" data-val="true" class="k-textbox" /> <span asp-validation-for="Description" class="text-danger"></span> <br /> <label asp-for="DisplayOrder" class=""></label> <kendo-numerictextbox for="DisplayOrder" format="0" /> <br /> <label asp-for="Format" class=""></label> <input asp-for="Format" autocomplete="off" class="k-textbox" /> <br /> <input type="submit" value="Save" class="btn btn-primary" /></form>Hello,
we implemented an onBeforeEdit listener for our popup-editing-grid as follow:
this.beforeEditHandler = function (e) {
var isDirty = dataSourceIsDirty();
if (isDirty) {
...
e.preventDefault();
}
}
When dirty grid-items exist, the edit-popup should not appear. This works fine when trying to edit a row, the popup is not being shown. However, when we try to create a new dataItem, the popup does not appear also, but a new empty row is being added to the grid (see attachment).
Any idea of how to prevent the grid to insert an empty row?
Thanks.