Hello,
I am having issues trying to get a validation to fire off on one of the fields of my data grid. This is the JSFiddle that is essentially what I've got so far:
https://jsfiddle.net/qct05yvy/24/
The title column has a validation that it is < 50 characters. This is correctly firing if I add that amount of characters.
The Start Date/End Date column have an on change function that gets the time (in days) between the two using momentjs and then it updates the Duration column. The issue is that it allows a negative duration (meaning you set the end date to a date before the start date) and causes some issues with the calculation I do on the backend.
I can prevent the user from submitting it to the backend by changing the update method in the datasource, but then I can't throw an error message like the one that happens when you add > 50 characters in the Title field (no, a Javascript alert will not work in my case unfortunately).
I need to be able to either make this validation actually fire correctly and correctly display the message or be able to prevent the user from selecting a date before the startDate DatePicker (which I spent several hours researching and found no way to do this programatically. I know I can set the Min, but how do I re-set the Min whenever they select a new startDate?).
Can anyone help me out? Thank you for your time!
-Ken

Hello,
I am having three issues with a modal pop up window. The first is the most annoying one, periodically I will get the following message when I hit a button to open the window.
Line: 82
Error: Unable to get property 'center' of undefined or null reference
Now if I switch the center to after open it then gives me the same error with open instead of center. Then if I switch them back it works perfectly fine. Here is the code from the page to show you what I mean:
<br />
@(Html.Kendo().Window()
.Name("SelectD")
.Title("Select a Charcter")
.Content("Loading information.....")
.LoadContentFrom("Index", "Characters")
.Modal(true)
.Visible(false)
.Width(500)
.AutoFocus(true))
<span id="selD" class="btn btn-default">Delete Character</span>
<script>
$(document).ready(function () {
$("#selD")
.bind("click", function () {
$("#SelectD").data("kendoWindow").center().open();
});
});
</script>
I have the above in two places with only the id and name being different between the two, they both reference the same partialview. It is annoying because I do not know when it will break on me.
The second issue is closing this modal window. I have a select and a cancel button defined in the partialview. The code is as follows:
<script>
$('#SelChar').click(function (e)
{
e.preventDefault();
window.top.location.replace = '@Url.Action("Edit", "Characters")' + '?id=' + $('#Char_ID').val();
window.close();
});
</script>
<a id="SelClose" class="btn btn-danger">Cancel</a>
<script>
$('#SelClose').click(function ()
{
window.close();
});
</script>
Now the SelChar script works perfectly fine, it closes the modal window and navigates to the proper page. The SelClose does not, it closes out all windows. How do I get it to close only the modal window?
The last issue is without using iframes, how do I get the background of the modal window to be the color I am looking for? In my partialview the body tag has a style of background-color:grey, but all I get is a white background. When I had iframes I would get the background color, but I was also getting the navbar which I did not want.

Hi,
I created a Grid with Filter Row and using ajax:
@(Html.Kendo().Grid<Products>() .Name("grid") .DataSource(dataSource => dataSource .Ajax() .PageSize(10) .ServerOperation(true) .Model(model => model.Id(p => p.Id)) .Read(read => read.Action("GetList", "CurrentController").Data("HandleFilters")).PageSize(10) ) .Columns(columns => { columns.Bound(model => model.Name). Filterable(ftb => ftb.Cell(cell => cell.Operator("contains")). Operators(m => KendoUICustomLocalization.GridFilterLocalization(m))); columns.Bound(model => model.LastName). Filterable(ftb => ftb.Cell(cell => cell.Operator("contains")). Operators(m => KendoUICustomLocalization.GridFilterLocalization(m))); }) .Pageable(p => p.Messages(m => KendoUICustomLocalization.GridPageLocalization(m)) .PageSizes(10)) .Sortable() // Enable sorting .Filterable(ftb => ftb.Mode(GridFilterMode.Row)) .Selectable(selectable => selectable.Mode(GridSelectionMode.Multiple)) .Excel(excel => excel
.FileName("Excel.xlsx")
.Filterable(true)
.AllPages(true)
.ProxyURL(Url.Action("Excel_Export_Save", "CurrentController"))
)
.Events(events => events.Change("onGridChange"))
)
and the GetList action:
public ActionResult GetList([DataSourceRequest]DataSourceRequest request, string filtro_texto) { IQueryable<Products> products = _uow.GetProducts(); ............. DataSourceResult result = products_model.ToDataSourceResult(request); return Json(result, JsonRequestBehavior.AllowGet); }I see that the GetList action is called two times, one with the request pageSize = 0, and other with the request pageSize = 10
Is there any problem in my code? Is it a nomal behaviour?
Best regards

Hello,
I am in need of a custom editor for the Gantt task because I need to validate and/or have a dropdown for a field. I can see how to achieve that by following https://docs.telerik.com/kendo-ui/api/javascript/ui/gantt#configuration-editable.template but that doesn't show me how I can get the resource editor to work. Neither have I found anything from searching the Internet or these forums.
So my question is, how to achieve the normal resource editor for Gantt tasks while using a custom editor template?
I'm using the scheduler with server filtering and I'm trying to get the next start date & end date of the scheduler view but i can't figure it out.
i'm not using ASP/C# so i need a JS example of how to do this. Every example i've found has just linked to a visual studio project, which is no good for me.
Hi,
I am trying to set up a kendo grid for my asp.net core application but running into 'kendoGrid is not a function' error. Please see attached snap shot for the error and script references that i have included in my file.
Thanks!

Hi,
I am having a requirement to get sum and average of selected items (cells of specific numeric columns) of a grid in either an alert , Field or popup
Such as in the below example I want to get the average and Sum of selected Frieght columns
eg: https://demos.telerik.com/aspnet-mvc/grid/selection
I am not able to find the event for selectable: "multiple cell"
And also I want to allow this feature only on numeric fields. Please suggest the possible solution for this.
Hi,
I have a Grid With Master-Detail logic implemented which works just fine except 2 things:
1.) detailInit gets called every time I expand a row. Why? Can this be changed?
2.) If the detail grid has no data to show due to filtering I would like to remove the detail grid completely and show a text message instead "no Data".
I also want to get rid of the columns etc...so the complete Grid should disapear.
My MasterGrid and DetailGrid is defined as:
$("#kendoGefahrstoffGrid").kendoGrid({ groupable: true, //Können die Records per Drag and Drop grupiert werden? sortable: true, //Dürfen die Spalten sortiert werden oder nicht scrollable: false, resizable: true, detailInit: detailInit, dataBound: function() { this.expandRow(this.tbody.find("tr.k-master-row")); }, columnMenu: true, //Zeigt ein Menü an um Sortierung vorzunehmen oder eine Spalte ein bzw. auszublenden toolbar: kendo.template($("#toolbarTemplateGefahrstoff").html()), columns: [{ field: "ID", title: "ID", width: 50 }, { field: "SelGefarhrstoff.Title", title: "My Gefahrstoff Title" }, { field: "SelGefarhrstoff.Modified", title: "CheckDate" }, { field: "SelGefarhrstoff.CMR_Kat", title: "CMR Kategorie" }, { command: [{ text: "Edit", click: editItem, iconClass: "k-icon k-i-edit" }], title: "Actions", width: "120px" }, { command: [{ text: "create $18", click: createp18, iconClass: "k-icon k-i-file-add" }], title: "§18 Action", width: "120px" } ], dataSource: dataSourceGefahrstoff}); //kendoGefahrstoffGrid
function detailInit(e) { dataSourceSelectedBAsDetails = new kendo.data.DataSource({ schema: { model: { id: "ID" } }, transport: { read: function (options) { $pnp.sp.web.lists.getByTitle("SelectedBAs").items .select("*,UniqueId,FieldValuesAsText") .expand("FieldValuesAsText") .filter("INGAId eq " + currentINGA) .get() .then(function (items) { console.log("SelectedBAs results:", items); options.success(items); }) //then function .catch(function (e) { console.log(e); options.error(e); }) //catch function } //read function }, //transport filter: { field: "GefahrstoffbezugId", operator: "eq", value: e.data.SelGefarhrstoff.Id } }); //datasource $("<div/>").appendTo(e.detailCell).kendoGrid({ dataSource: dataSourceSelectedBAsDetails, noRecords: { template: "No data available" }, columns: [{ field: "ID", title: "ID", width: 50 }, { field: "OData__dlc_DocIdUrl.Url", title: "Doc", template: '<a href="#=OData__dlc_DocIdUrl.Url#">Details</a>' }, { command: [{ text: "Edit", click: editItem, iconClass: "k-icon k-i-edit" }, { text: "view", click: showDocInBrowser, iconClass: "k-icon k-i-file" }], title: "Actions", width: 240 } ] });}
