kendo-asp.net-mvc

Kendo Grid is not returning dataItem in the event “onchange” of grid

丶灬走出姿态 提交于 2020-01-14 04:35:06
问题 My Kendo grid has inline editing, and data is bound through ajax. I have tried different options like: 1) var grid = $("#Grid").data("kendoGrid"); var row = $(this).closest("tr"); var rowIdx = $("tr", grid.tbody).index(row); var item =grid.dataItem(row) 2) var row = $(this).closest("tr"); var grid = $("#Grid").data("kendoGrid"); var item = grid.dataItem(row); 3) var selectedItem = this.dataItem(this.select()); -- I can't use this because my client does not want single click selection or

kendoValidator() causes “The field xxx must be a date” error when using DatePicker

本小妞迷上赌 提交于 2020-01-14 03:13:28
问题 Im my MVC5 application selecting date in "dd/MM/yyyy" format causes "The field xxx must be a date" error. On the other hand, if I comment kendoValidator() line as below the error has gone, but in that case I cannot perform client side validation and for this reason I want to use kendoValidator. Here are the code sections related to this control. Entity: [Required(ErrorMessage = "Required field")] [Display(Name = "Start Date")] public DateTime StartDate { get; set; } View: ... <script src="~

kendoValidator() causes “The field xxx must be a date” error when using DatePicker

喜欢而已 提交于 2020-01-14 03:13:21
问题 Im my MVC5 application selecting date in "dd/MM/yyyy" format causes "The field xxx must be a date" error. On the other hand, if I comment kendoValidator() line as below the error has gone, but in that case I cannot perform client side validation and for this reason I want to use kendoValidator. Here are the code sections related to this control. Entity: [Required(ErrorMessage = "Required field")] [Display(Name = "Start Date")] public DateTime StartDate { get; set; } View: ... <script src="~

How to add a template to a Kendo grid toolbar

拥有回忆 提交于 2020-01-13 19:01:08
问题 I am trying to add a custom template to Kendo MVC grid. My template should contain 2 things Create button to add new record to the grid Autocomplete box to filter the data in the grid. I am trying the following code : .ToolBar(toolbar => { toolbar.Template(@<text> <div class="toolbar"> <label class="category-label" for="category">Filter by name:</label> @(Html.Kendo().AutoComplete() .Name("employees") .DataTextField("empName") .Filter("contains") .MinLength(3) .Events(e => e.Change(

KendoUI DateTimePicker undefined on document.ready

ε祈祈猫儿з 提交于 2020-01-11 06:19:10
问题 I have a Kendo DateTimePicker control in an mvc (asp.net) partial view that I am trying to access from document.ready(): @(Html.Kendo().DateTimePickerFor(vvm => vvm.StartTime) .Name("dtpVisitStart") .Format("yyyy/MM/dd HH:mm tt") .TimeFormat("HH:mm:tt") .Events(e => e.Change("dtpVisitStart_Change") ) ) The javascript: $(document).ready(function () { TestDTP(); }); function TestDTP() { var dtp = $("#dtpVisitStart").getKendoDateTimePicker(); debugger; } When the debugger line runs dtp is

KendoUI DateTimePicker undefined on document.ready

元气小坏坏 提交于 2020-01-11 06:19:07
问题 I have a Kendo DateTimePicker control in an mvc (asp.net) partial view that I am trying to access from document.ready(): @(Html.Kendo().DateTimePickerFor(vvm => vvm.StartTime) .Name("dtpVisitStart") .Format("yyyy/MM/dd HH:mm tt") .TimeFormat("HH:mm:tt") .Events(e => e.Change("dtpVisitStart_Change") ) ) The javascript: $(document).ready(function () { TestDTP(); }); function TestDTP() { var dtp = $("#dtpVisitStart").getKendoDateTimePicker(); debugger; } When the debugger line runs dtp is

How to use export to excel in Hierarchical Kendo Grid MVC

这一生的挚爱 提交于 2020-01-07 01:55:48
问题 i have a Kendo Hierarchical grid which i have developed using Kendo MVC 2016.2.504.545 version. This grid has a state which gets drilled down to city and the city which gets drilled down to the persons Address. Now i want to perform a export to excel functionality in this grid. I call individual actions to populate results for the city, state and the address data in the kendo grid. any help would be appreciated. 回答1: I got some help with the telerik people and was able to achieve the

Using Or condition while filtering kendo grid

╄→гoц情女王★ 提交于 2020-01-06 20:19:45
问题 I am using a kendo grid in my MVC application. Grid has two columns FirstName and LastName. Grid has a textbox where user can enter FirstName or LastName to search. I want to filter grid based on this criteria. Following is the code that i am currently using : <script> $(document).ready(function () { $("#FirstNameFilter").keyup(function () { var value = $("#FirstNameFilter").val(); grid = $("#grid").data("kendoGrid"); if (value) { grid.dataSource.filter({ field: "FirstName", operator:

How I can rowspan kendo grid ui

≡放荡痞女 提交于 2020-01-05 07:55:09
问题 I want rowspan in gird kendo ui like this picture ? Images example Thanks so much! 回答1: Row spanning implies one of the following: that you will have access to at least two data items for a single table row element in a column or a row template, during rendering. This, unfortunately, is not possible with the Kendo UI Grid. even if you manipulate the table structure in the Grid's dataBound event, the Grid will not be aware of this and some operations will not work correctly (e.g. editing,

Enable or disable kendo grid columns based on another column value

别来无恙 提交于 2020-01-04 13:12:21
问题 I have a kendo grid and I have a check box in it, which is rendered using the client template. If the checkbox is checked then I want the column adjacent to it enabled and if it's not checked then the column should be disabled that is the user should not be able to edit it or type into it. I tried doing it by binding an edit event to the grid but the edit event is called only when the grid goes to edit mode and the function is not called while making changes to the grid. Any guidance is