kendo-ui

How can I prevent a user from typing more then 4 uinits of precision in a kendo numeric textbox

我只是一个虾纸丫 提交于 2019-12-11 02:53:28
问题 I have a requirement to allow a user to type a decimal with 4 units of precision. But only display 3. Is there a way to have the kendo-ui numerictextbox prevent more then 4 units of precision? $element.kendoNumericTextBox({ spinners: false, culture: "en-US", decimals: 4, step: 0.01, format: "n3" }); 回答1: I don't think there's a configuration option for that, but you can do something like this: var numeric = $("#num").kendoNumericTextBox({ spinners: false, culture: "en-US", decimals: 4, step:

Kendo MVC grid with editable enum column

≯℡__Kan透↙ 提交于 2019-12-11 02:45:20
问题 I have a simple model that I need to display and edit in Kendo's MVC Grid component. public class MyModel { public int Id {get; set;} public string SomeProperty {get; set;} public MyEnum MyEnum {get; set;} } public enum MyEnum { FirstItem = 1, SecondItem = 2, ThirdItem = 3 } And I have my grid set up like this: @(Html.Kendo() .Grid<MyModel>() .Name("grid").Columns(columns => { columns.Bound(o => o.SomeProperty).Width(200); columns.Bound(o => o.MyEnum).Width(200); columns.Command(command => {

Unable to style borders of a row of Kendo grid

我只是一个虾纸丫 提交于 2019-12-11 02:45:04
问题 I'm attempting to style an MVC kendo grid based on values in the underlying datasource. I have a mechanism that seems to work, but certain style elements (notably borders) do not seem to accept the new style class, whereas other elements (row background color) work fine. Grid: @(Html.Kendo().Grid(Of RTFVM)().Name("RealTimeFinancials") _ .Events(Function(x) x.DataBound("LineItems_Databound")) _ .Columns(Sub(c) c.Bound(Function(x) x.Line.LineItem).HtmlAttributes(New With {.style = "text-align

Kendo UI One DataSource for Multiple Grid

为君一笑 提交于 2019-12-11 02:37:52
问题 I have an issue with Kendo UI lately, I have 1 datasource and it is used by 3 grids. This is all working but for some reason styling of the grid is "dismantled" for a lack of better word. If I filter the datasource from Grid A, Grid A looks good but Grid B and C would look something like this (don't mind the firstname "Error" in the column): If I filter the datasource from Grid B, Grid B now will look good but Grid A and C will look "dismantled". What could be the problem? Grid A: $('#grid-a'

MVC Kendo UI Grid = Custom Button can't return selected row id

▼魔方 西西 提交于 2019-12-11 02:36:15
问题 I want to get the selected row "ID" but it just failed... and i have totally no clue what is happening here. MVC HTML Code : @(Html.Kendo().Grid(Model) .Name("grid") .HtmlAttributes(new { style = "margin-top: 5px" }) .Columns(c => { c.Bound(model => model.mgID); c.Command(com => { com.Custom("Edit").Click("Edit");}); }) .Pageable() .Sortable() .Selectable() .DataSource(d => d .Ajax() .PageSize(20) .Model(model => model.Id(i => i.mgID)) .Read(r => r.Action("Manage_Read", "Manage")) .Destroy(o

Bar graph Stack data on the top of each other

蹲街弑〆低调 提交于 2019-12-11 02:28:52
问题 I am using this chart implementation. However, it disperse my data rather than stack on the top of each other. I want to stack my first array on 1970, the second one on 1975. In other words, I would like to have two stacked bar rather than have five. I would like to keep my data array as it is, rather than seperating them into pieces. function createChart() { $("#chart").kendoChart({ title: { text: "World population by age group and sex" }, legend: { visible: false }, seriesDefaults: { type:

Excel export of Telerik Kendo Grid with multiple detail levels

╄→尐↘猪︶ㄣ 提交于 2019-12-11 02:17:48
问题 I have a Kendo Grid with "multiple hierarchy" - two detail levels, like this: Main row Details Details of details Some more details of details Details Details of details Main row Details Detail of details Using this example I am able to export the "Main row" along with the "Details" row. But I am having a hard time exporting the "Details of details" row. I know it is possible using the approach in the example, but cannot seem to shuffle the code "the right way". Has anyone done this before,

Kendo grid duplicate records inserted

前提是你 提交于 2019-12-11 01:57:44
问题 I have a kendo grid in inline editing mode. When I press "Add new item" button, new row is added and set to the edit mode. By pressing the "Update" button multiple time, I'm able to insert duplicate records into database. Is there a possibility to disable Update button after the first click? Also row selection on kendo grid is lost after insert is performed. Is that normal behavior? 回答1: This would happen if you don't return the ID of the newly inserted records. The Kendo DataSource would

Kendo ui - how to tie validation to mvc model attributes

社会主义新天地 提交于 2019-12-11 01:51:15
问题 From reading the posts in this thread - and being unable to post the question there for some bizarre reason :( I will ask it here in hope of getting a solution Am I write in saying that I have to do validation like below.. I add the html5 attribute (data-required-msg/validationMessage) to the textbox and the required attribute as well.. I make a span for the invalid msg and tie it to the field with the "data-for" attribute. The message "Please enter name" should appear in this span then.

How can I accept JSON requests from a Kendo UI data source in my MVC4 application?

蹲街弑〆低调 提交于 2019-12-11 01:51:04
问题 I am using the Kendo UI grid in my MVC3 application and am quite pleased with it. I am using a Telerik provided example, excerpt below, to format the data posted by the grid's DataSource ally, and all is good. However, I don't want to have to rely on code like this. I would like to get Kendo and MVC talking without the 'translator', i.e. this code: parameterMap: function(data, operation) { var result = { }; for (var i = 0; i < data.models.length; i++) { var model = data.models[i]; for (var