Hello all,
I have a grid bound to a datasource that is receiving data from an odata-v4 endpoint. The data is loaded correctly and I have several columns with templates defined as the data has some complex values. One of the fields in this complex object is a date field (returned as so: "2015-09-01T00:00:00-05:00"). By default sorting by this column does not work, neither does formatting using the format property in the grid column (format: "{0:MM/dd/yyyy}"). So I realize I need to declare the field as a date type in the schema.model. Thus I have:
schema: { model: { fields: { workPeriod: { startDate: {type: "date"} } } }}
However, this does not seem to be declaring the type correctly. Is this not how you reference a complex object in the schema for a datasource?
Can anyone tell me what file and how I would modify to display node checkboxes BEFORE the node icons, See the attached mock up picture. I would also like to improve the separation spacing slightly.
Thank you in advance,
- Charlie
Hi Telerik,
I'm trying to do a custom view like in this example (http://dojo.telerik.com/@ggkrustev/oZUCu) but with range selection dates (http://demos.telerik.com/kendo-ui/datepicker/rangeselection).
Is it even possible in scheduler?
Thank you
Hi,
I'm testing out Kendo Maps and was running the remote-markers sample offline. I was expecting the markers to appear when I run the remote-markers.html file but they do not. Index.html is working fine though. It would be great if you could suggest the possible causes as to why this is so. By the way, I'm running Kendo Professional 2016.1.112.trial.
Best Regards,
CH
I need to set a value in inactive row.
However, If the active row is in edit mode, the value doesn't applies to the grid.
Please check following operation and code.
Case 1 (expected case):
・operation
â‘ Click first record's "attribute" cell.(change to edit mode)
â‘¡In browser console, below command execute.
var item = $("#grid").data("kendoGrid").dataSource.at(0);
item.set("attribute", "123");
・result
first record's "attribute" value is changed from "foo" to "123".
Case 2 (unexpected case):
・operation
â‘ Click second record's "attribute" cell.(change to edit mode)
â‘¡In browser console, below command execute.
var item = $("#grid").data("kendoGrid").dataSource.at(0);
item.set("attribute", "123");
・result
first record's "attribute" value isn't changed.
(The value of the model has been changed. But it does not apply to the grid.)
following is test code:
<!DOCTYPE html><html><head> <title>KendoUI Test Page</title> <link href="http://cdn.kendostatic.com/2015.2.902/styles/kendo.common.min.css" rel="stylesheet" /> <link href="http://cdn.kendostatic.com/2015.2.902/styles/kendo.default.min.css" rel="stylesheet" /> <link href="http://cdn.kendostatic.com/2015.2.902/styles/kendo.dataviz.min.css" rel="stylesheet" /> <link href="http://cdn.kendostatic.com/2015.2.902/styles/kendo.mobile.all.min.css" rel="stylesheet" /> <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script src="http://cdn.kendostatic.com/2015.2.902/js/kendo.all.min.js"></script></head><body> <div id="grid"></div> <script> function readonlyEditor(container, options) { container.text(options.model[options.field]); } var dataSource = new kendo.data.DataSource({ data: [ { id: 1, item: "Item1", attribute: "foo" }, { id: 2, item: "Item2", attribute: "bar" } ], schema: { model: { id: "id", fields: { id: { type: "number" }, item: { type: "string" }, attribute: { type: "string"} } } } }); $("#grid").kendoGrid({ dataSource: dataSource, columns: [ { field: "item"}, { field: "attribute", editor:readonlyEditor } ], editable: true, }); </script></body></html>My grid that is bound to json data is not displaying the data. Here is my code.
<script>
var remoteDataSource = new kendo.data.DataSource(
{
transport:
{
read: {
type: "get",
dataType: "json",
url: "http://localhost:50411/EmployeeService.asmx/GetData",
contentType: "application/json; charset=utf-8"
}
},
pageSize: 4
})
$("#grid").kendoGrid(
{
dataSource: remoteDataSource,
columns: [
{
field: "pin",
title: "PIN",
width: 600,
filterable: true
},
{
field: "firstName",
title: "First Name",
width: 100,
filterable: true
},
{
field: "lastName",
title: "Last Name",
filterable: true,
},
],
schema: {
data: "list"
},
height: 430,
scrollable: true,
sortable: true,
pageable: true,
});
</script>
Im using an asmx webmethod.
[WebService(Namespace = "http://localhost/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
[System.Web.Script.Services.ScriptService]
public class EmployeesService : System.Web.Services.WebService
{
[WebMethod]
public static string GetData()
{
JavaScriptSerializer serializer = new JavaScriptSerializer();
List<DepartmentEmployees> employees = EmployeeRules.GetDepartmentEmployeeses(Debug.GetEmployees(20));
return serializer.Serialize(employees);
}
}
Hi..
I created kendo grid with default client side paging and grouping,its working fine,is there any possibility to apply pagination on grouped aggregate instead of total items.here is the attached image GridGrouping.jpg,
In image i'm giving page size 5 and displaying 3 aggregates ,each aggregate is having 2 items ,i want to display
5 aggregates in a page instead of 5 items
kindly resolve my issue,
thanks in advance
I have a grid with Inline batch editing mode on. I am trying to display dropdownlist inside the grid and enable user to select values from the dropdown. The issue i am running into right now is, by default it shows null value, when clicked on that cell it shows all the dropdown values and you can select to different dropdown value. But as soon as you click outside the grid cell, it reverts the text to 'null' again. When clicked on the cell back again, it changes from 'null' to previously selected value.
ViewModel:
public class CreateAsnRequestViewModel{ [Display(Name = "UPC UOM")] public string UPCUOM { get; set; } public string UserDefinedCode { get; set; } }public class CommonDetailsCommonProperties{ public string ProductCode { get; set; } public string UserDefinedCodes { get; set; } public string UserDefinedCode { get; set; } public string CombinedValuesToSave { get; set; }}public class UOMItem : CommonDetailsCommonProperties{ public string UOM { get; set; }}public class CommonDetailsViewModel{ public List<UOMItem> UOMs { get; set; }}Controller:
CommonDetailsViewModel commonDetailsViewModel = commonService.InvokeGetCommonDetails(flag);ViewData["UOMList"] = commonDetailsViewModel.UOMs;Views:
EditorTemplate: _UOMDropDownList.cshtml
@using System.Collections@using Kendo.Mvc.UI;@(Html.Kendo().DropDownList().BindTo((IEnumerable)ViewData["UOMList"]) .DataValueField("UserDefinedCode") .DataTextField("UserDefinedCode") .Name("UPCUOM"))Main Razor View:
@(Html.Kendo().Grid<SupplierPortal.ViewModels.CreateAsnRequestViewModel>() .Name("GridViewOpenPOSelected") .Columns(columns => { columns.Bound(p => p.UPCUOM).HtmlAttributes(new { @class = "editableFiled" }).EditorTemplateName("_UPCUOMDropDownList").ClientTemplate("#:UserDefinedCode#").Width(180); }) .Editable(editable => editable.Mode(GridEditMode.InCell).DisplayDeleteConfirmation(false)) .AutoBind(false) .Navigatable() .DataSource(dataSource => dataSource .Ajax() .Batch(true) .PageSize(10) .Read(read => read.Action("GetSelectedPO", "Asn").Data("GetSelectedPOParameters")) .ServerOperation(false) .Model(model => { model.Id(p => p.Id); })) .Events(events => events.DataBound("gridDataBound")) .Events(events => events.DataBinding("gridDataBinding")) .Events(events => events.Edit("onEdit")))
Any help will be appreciated.
Thanks.