kendo-ui

Handle destroy event in kendo scheduler

强颜欢笑 提交于 2019-12-12 10:45:52
问题 I am using a kendo scheduler. There are events added in scheduler grid. On mouse hover of each event a small (x) comes on top right corner. i.e destroy event for that event, which when clicked shows an warning message "Are you sure you want to delete this event?" If clicked Yes it goes ahead and deletes that event. So here is my requirement. As you can see above there are 3 scheduled events in the shown week. I want that, the one circled in blue shouldn't have delete option but the one

How Do I Raise the Change Event in the KendoUI DatePicker?

左心房为你撑大大i 提交于 2019-12-12 10:33:16
问题 I'm trying to set the value of my DatePicker using the code below and expecting the "Change" event to be raise but it doesn't. var datePicker = $("#datePicker").data("kendoDatePicker"); var previousDate = new Date(datePicker.value()); previousDate.setDate(previousDate.getDate() - 1); $("#displayDate").text(kendo.toString(new Date(previousDate), 'D')); datePicker.value(previousDate); Change the date value through the user interface does raise the "Change" event as expected however. 回答1: Please

How can I force Kendo Grid to use a numeric filter on a column

断了今生、忘了曾经 提交于 2019-12-12 09:47:41
问题 Using the following code, Kendo Grid uses the string filter interface for t.Files.Count even though the type is an int . How can I force the grid to use the numeric filter UI instead? @(Html.Kendo().Grid<GJW_Site.Web.Models.TargetsModel>() .Name("grid") .Columns(columns => { columns.Bound(t => t.ID).Width(80); columns.Bound(t => t.OrbitalPeriod); columns.Bound(t => t.Files.Count); }) .Sortable() .Filterable() .DataSource(dataSource => dataSource.Ajax() .PageSize(20) .Read(read => read.Action(

Convert .NET date/ time format string to Javascript date/ time format string

梦想的初衷 提交于 2019-12-12 08:51:06
问题 Is there a javascript library or some other mechanism that will allow me to pass a .NET date/ time format string (i.e., yyyy-MM-dd HH:mm:ss ) to a javascript function and have it parse a supplied datetime value accordingly? I've been looking for a while but I can't seem to find exactly what I am looking for. My imagined usage will allow me to provide a custom format string from a .NET provider, and allow my existing javascript libraries (like Kendo) to render the date/time consistently. Since

Why Is `data(“kendogrid”)` Undefined?

情到浓时终转凉″ 提交于 2019-12-12 08:47:01
问题 I'm a starter in kendo.ui, I've written this code to create kendo.ui.grid @(Html.Kendo().Grid<BrandViewModel>(Model) .Name("Grid") .Columns(columns => { columns.Bound(p => p.BrandName); columns.Bound(p => p.BrandAbbr); columns.Bound(p => p.SrcImage); columns.Command(command => command.Custom("Edit").Click("editItem")); }) .DataSource(dataSource => dataSource .Ajax() .Read(read => read.Action("CustomCommand_Read", "Brand")) .Model(model => model.Id(p => p.Id)) ) ) When the user clicks the edit

Can Kendo Grid be always in edit mode?

早过忘川 提交于 2019-12-12 08:26:58
问题 Does anyone know if the kendo grid could be always set to edit mode at all times? We don't want the user to click on a cell or a button to activate the edit mode. We want it the widgets to be displayed and available at all times. Is it possible at all? 回答1: Apart from using batch editing mode you can try setting the template of every column and binding the input elements to the data items using MVVM. $("#grid").kendoGrid({ dataSource: { schema: { model: { id: "id", fields: { id: { editable:

Kendo UI Grid select by data item

谁都会走 提交于 2019-12-12 08:15:37
问题 I have a Kendo UI Grid with a large datasource and paging. I have an event that fires where I know the underlying data item that I want to select, but am unsure on how to programatically page/select this item in the grid. If the item is not on the current grid page, I cannot use datasource.view() to poke through when the data is not on the current page. Does anyone know how I can select an item by its underlying data source object? I've got a similar situation to where i am at @: http:/

Kendo DataSource: How to define “Computed” Properties for data read from remote odata source

為{幸葍}努か 提交于 2019-12-12 07:28:20
问题 Situation: kendo DataSource var ordersDataSource = new kendo.data.DataSource({ type: "odata", transport: { read: { url: "http://localhost/odata.svc/Orders?$expand=OrderDetails" } }, schema: { type: "json", data: function(response){ return response.value; } total: function(response){ return response['odata.count']; } }, serverPaging: true, serverFiltering: true, serverSorting: true }) the json data read from the odata source is like: { odata.metadata: "xxxx", odata.count: "5", value: [ {

Caching a Kendo UI DataSource object using localStorage

天大地大妈咪最大 提交于 2019-12-12 07:19:20
问题 I am using the Kendo UI ComboBox with an external, XML DataSource. Here's the DataSource code: try { var csDataSrc = new kendo.data.DataSource( { transport: { read: "Data/StateList.xml", dataType: "xml", create: { cache: true } }, schema: { type: "xml", data: "/States/State", model: { fields: { id: "id/text()", name: "name/text()" } } } }); csDataSrc.read(); } catch (err) { log.error(err.message); } That creates the data source, here's the code that creates the kendo combobox: $("#stateList")

How to set filter property through javascript or Jquery for a kendo dropdown

本秂侑毒 提交于 2019-12-12 06:50:00
问题 I have a kendo dropdown list in cshtml. I wanted to set filter property in Jquery or javasctipt. Could you please tell me how to acheive this? Appreciate your help on this. @(Html.Kendo().DropDownList() .Name("movies") .DataTextField("Text") .DataValueField("Value") .HtmlAttributes(new { style = "width: 100%" }) .BindTo(new List<SelectListItem>() { new SelectListItem() { Text = "The Shawshank Redemption", Value ="1" }, new SelectListItem() { Text = "The Godfather", Value ="2" }, new