kendo-ui

KendoUI: resetting grid data to first page after button click

江枫思渺然 提交于 2019-11-28 03:09:12
问题 I have the following scenario: in my page I have a grid (with pagination) bounded to a datasource. When I click on the button "Extract" the grid gets populated (reading paginated data through a web service). Then i select "page 2" through grid pagination. Again the web service is invoked to return data. Now: I would like to click on "Extract" once more, to reload and show data on the first page. I'm not sure which is the best way. I would like to make just one call to the service (with input

Get record count in Kendo Grid after dataSource.read

半世苍凉 提交于 2019-11-28 02:38:09
问题 I want to be able to push the record count from my Kendo grid after read (refresh). Here is my Kendo Grid: @(Html.Kendo().Grid(Model) .Name("SearchWindowGrid") .Columns(columns => { columns.Bound(p => p.SYSTEM_ITEMS_SEGMENT1).Hidden(); }) .ClientRowTemplate( "<tr>" + "<td>" + "<span><b>#: SYSTEM_ITEMS_SEGMENT1#</b></span> <br/>" + "<span>#: DESCRIPTION# </span>" + "</td>" + "</tr>" ) .DataSource(dataSource => dataSource .Ajax() .Read(read => read.Action("PopulateSearchWindow", "Item").Data(

Bootstrap 3 grid system does not work correctly within a 3rd party styled div (Kendo)

故事扮演 提交于 2019-11-28 02:22:32
See issue demonstration: full issue demonstration and sandbox I would like to use Bootstrap 3 grid system within a <div> element. This <div> element is a Kendo datagrid toolbar which is a full page width <div> element. I do not think the solution is Kendo specific or requires Kendo skills, so please keep reading. Unfortunately the Kendo CSS applies some style on this <div> element which somehow fools bootstrap 3 grid system width calculation. As a result if I try to use col 12 units within this <div> element it always breaks down to 2 rows. For example col-6 and a col-6 breaks. A col-6 and a

When editing a grid, how do I disable specific fields by row?

青春壹個敷衍的年華 提交于 2019-11-28 01:37:34
问题 I have a kendo grid with data in it and multiple columns (say col 1, 2, and 3). Columns 1, 2, 3 need to be able to be edited (or preventing editing) based off the values of each other. This is row specific. For instance, if column 1 (date) is < column 2 (date) then column 3 is not allowed to be edited. I know it's simple enough to disable or enable an entire column but my requirements are row specific. So row 1 could have column 3 enabled and row 2 could have column 3 disabled. Any thoughts?

Kendo-UI grid Set Value in grid with Javascript

◇◆丶佛笑我妖孽 提交于 2019-11-27 21:10:09
问题 I'm just wondering how you go about changing a value of a row in a grid in JavaScript so that it is marked as 'dirty' in the grid and the underlying datasource. e.g. I have a list of Contact/Customer. They have 3 fields FirstName/LastName/IsPrimaryContact. There can only be 1 primary contact, so when the primary contact is set to true on a record I have JavaScript code that loops through the datasource and sets any other contacts set as primary to false. The JavaScript all fires fine and the

Kendo MVVM and binding or extending custom events

做~自己de王妃 提交于 2019-11-27 18:31:06
问题 I have a ComboBox in my page and I want to bind keypress event to my Kendo ComboBox when the cliend writes down any letter. As I understand kendo doesn't have any keypress event on ComboBox. I've found that kendo has something like this to bind values and functions: kendo.data.binders.slide = kendo.data.Binder.extend({ refresh: function () { var value = this.bindings["slide"].get(); if (value) { $(this.element).slideDown(); } else { $(this.element).slideUp(); } } }); Source: Click Here But

How to change columns set of kendo grid dynamically

筅森魡賤 提交于 2019-11-27 18:12:29
I am trying to change the columns collection of my Kendo grid in the below way. var grid = $("#grid").data("kendoGrid"); $http.get('/api/GetGridColumns') .success(function (data) { grid.columns = data; }) .error(function (data) { console.log(data); }); This is changing the column collection but not reflecting immediately in my grid. But when I try to perform some actions in the grid (like grouping), then my new column set is appearing. Please let me know how can I achieve this. Regards, Dilip Kumar Edu Cielo You can do it by setting the KendoUI datasource, destroy the grid, and rebuild it $("

How to add row number to kendo ui grid?

我与影子孤独终老i 提交于 2019-11-27 15:05:31
问题 I have a kendo ui grid in my page that has some columns. Now I want to add a column to it that shows me row number. How to I do this? Thanks. 回答1: Initialize a variable and show it in column as template: "#= ++record #" Working Demo Here is code: var record = 0; $("#grid").kendoGrid({ dataSource: { data: [{ foo: "foo" },{ foo: "foo" },{ foo: "foo" },{ foo: "foo" },{ foo: "foo" },{ foo: "foo" },{ foo: "foo" },{ foo: "foo" },{ foo: "foo" },{ foo: "foo" },{ foo: "foo" },{ foo: "foo" },{ foo:

What is the proper way to load new content into a kendo window?

两盒软妹~` 提交于 2019-11-27 13:56:27
问题 I have a kendo window that has a form inside it. The form has input elements with a record's data populated within it. The user may close the window and select a different record to view. When the user does this, I need to show the kendo window again with the same form but with different record data. Here's what I'm currently doing if (!$("#winContainer").data("kendoWindow")) { $("#winContainer").kendoWindow({ modal: true, width: "969px", height: "646px", title: "View Record", content:

Kendo UI datepicker incompatible with Chrome 56

若如初见. 提交于 2019-11-27 12:52:45
After updating Chrome to its last version 56.0.2924.76 (64-bit), our Kendo datepickers started not to work properly. All datepickers were binded using ViewModels, and now they don't show their values. If we inspect them we see the value is set, but it's not been shown. For example: @(Html.Kendo().DatePicker() .Name("DateFrom") .Start(CalendarView.Month) .Depth(CalendarView.Month) .Format("MM/dd/yyyy") .HtmlAttributes(new { @id = "ClosingStartDate", @placeholder = "enter date from", @class = "masked-date" })) If I inspect this element with Chrome's Developer tool I have this result: <input