asp.net-mvc,kendo-ui,kendo-grid,kendo-datasource
You can call the cancelChanges method of the data source and then read. There is no need to call grid.refresh() as it will be called automatically when dataSource.read() is done.
kendo-ui,kendo-datasource,kendo-chart
This is a problem with Chrome's implementation of Array.sort; see this discussion. You can fix it by sorting the data source explicitly: dataSource: { data: rawdata, group: { field: "Serie" }, sort: [{ field: "Serie", dir: "asc"}, { field: "Segmento", dir: "asc"} ] }, (updated demo)...
json,kendo-ui,kendo-datasource
Following Kendo UI documentation: The view() method returns only displayed data - after filtering, sorting, groupping and page selection. If you don't use any of this features or if you use it on the server side view() and data() will give you the same data. In simple words view() returns...
jquery,kendo-ui,hierarchical-data,kendo-treeview,kendo-datasource
I have to call load() to the haystack before I recursive, so that the haystack's children are loaded. function findTreeviewNodeById(haystack, needle) { var uid = null; for (var i = 0; i < haystack.length; i++) { haystack[i].load(); if (haystack[i].id == needle) { uid = haystack[i]; } else if (haystack[i].hasChildren) {...
asp.net-web-api,kendo-datasource,asp.net-web-api-odata
Since it is a very specific task, I have only one tweak that is working for Repository Pattern provided by Le framework shown in the above mentioned link. define(['kendo', 'testModel'], function (kendo, testModel) { var svcUrl = '/odata/modelURL'; var ds_test = new kendo.data.DataSource({ type: 'odata', transport: { read: { //async:...
javascript,jquery,kendo-ui,kendo-grid,kendo-datasource
I found the answer, this may help others. Here how you can attach function in document ready var grid = $("#grid").data("kendoGrid"); grid.dataSource.transport.options.read.data = getFilters; And then call read() to reload the grid. Every time you call read() the attached function "getFilters" will get executed. grid.dataSource.read(); ...
kendo-ui,kendo-grid,datasource,kendo-datasource
Use the query method of the data source: dataSource.query( { sort: [ /* sort descriptors */], group: [ /* group descriptors */ ], page: dataSource.page(), pageSize: dataSource.pageSize() }); ...
javascript,kendo-ui,kendo-datasource,kendo-listview
Why don't you add it server-side? Anyway, if you want to do it in dataBound, just check whether it exists and only add if it doesn't: dataBound: function (e) { var dsource = this.dataSource; if (dsource.at(0).FilterName !== "All") { dsource.insert(0, { FilterId: 0, FilterName: "All" }); } }, As an...
javascript,jquery,kendo-ui,kendo-datasource,kendo-listview
Here is the viewmodel and js. This will only change it one way, but you should be able to extrapolate from here if need be. In action in this fiddle var viewModel = kendo.observable({ DSOne: new kendo.data.DataSource({ data:[ {id:1, name:'Bob'}, {id:2, name:'Tom'}, {id:3, name:'Carol'}, {id:4, name:'Ann'} ], pageSize: 2, serverPaging:...
javascript,jquery,kendo-ui,kendo-grid,kendo-datasource
When you call ds.data(data), data has to be an array of items. Your server backend is probably returning a response object that has the array in data.data, so you need to call: ds.data(data.data); ...
javascript,kendo-ui,kendo-datasource
I managed to get it working using the transport API. http://dojo.telerik.com/OBUSU/4 var treeListDataSource = new kendo.data.TreeListDataSource({ transport: { read: function (options) { var data = dataArray; options.success(data); } }, ... }); function change() { var newData = [ { Id: 6, Name: "RootD", ParentId: null }, { Id: 7, Name:...
c#,.net,asp.net-mvc,razor,kendo-datasource
As it turns out, the browser automatically follows the redirect on the xhr and the kendo datasource can not know about this in any way. And since the redirect returns a 200 status code, the error handler does not get fired at all. In my opinion, since the response is...
kendo-ui,kendo-grid,kendo-datasource
I resolved out with this solution : https://jsfiddle.net/Endrik/smLfh67e/1/ It's very similar to Frederic solution but with few changes. 1) I start from a datasource object, cause I will get my data from remote If you change the type of data loading in the DataSource object, the example should work equally....
kendo-ui,kendo-datasource,kendo-listview
Your function createUI define read data as constant value from parameter instead of function. Paging in data source will trigger read method, therefore your paging still use previous search term. You can make a function like this to make read data get new value(search term). function getSearchTerm() { return {...
kendo-ui,kendo-grid,kendo-datasource
I wouldn't transform the data at the data source. That job is the responsibility of the UI component. Instead move your logic to the column template function of your grid. [ API reference ] $('#grid').kendoGrid({ columns: [ { field: 'fruit', template: function(dataItem) { var html = []; for (var i...
javascript,kendo-ui,kendo-datasource,kendo-mvvm
A kendo.data.DataSource is not an array; the correct API method is add: dataSource.add(...); (demo) same problem: this.get("products") // this is not an array, yet you treat it like one if you want to get the data, use the DataSource.data() method: this.get("products").data() ...
javascript,kendo-ui,kendo-grid,kendo-datasource
My suggestion would be to format the numeric textbox as a percentage and set the step to 0.01 so that it increments/decrements 1% at a time. If you're worried about the user typing in a percentage as a whole number, handle it in the change event. e.kendoNumericTextBox({ format: '{0:p4}', step:...
kendo-ui,kendo-asp.net-mvc,kendo-datasource,kendo-listview
To enable server paging, you should configure data source to enable serverPaging. Then the data source will leave the data item paging implementation to the remote service. By default the data source performs paging client-side. <script> var dataSource = new kendo.data.DataSource({ transport: { /* transport configuration */ }, serverPaging: true,...
kendo-ui,telerik,kendo-mobile,kendo-datasource
You should be able to get access to your json data within the datasource. I'm using the requestEnd event. You didn't explain exactly what you're trying to do with the data once you know an article is featured so I'm just showing a basic way to get the data and...
kendo-ui,kendo-mobile,kendo-datasource
The callback url parameter is the name of the callback jQuery created for this JSONP request (for a more detailed explanation, take a look at the dataType option for jQuery.ajax(). As to why your data is not being sent: you can only do that with POST requests, and JSONP requests...
sorting,datetime,kendo-ui,datetime-format,kendo-datasource
I imagine this occurred because the value was converted to a string in the parse function so it was no longer sorting like a date so I removed the parsing code from the field: sort: { field: 'dateTime', dir: 'asc' }, schema: { model: { id: 'Id', fields: { dateTime:...
ajax,kendo-ui,kendo-datasource
Please try with the below code snippet. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Kendo UI Snippet</title> <link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1119/styles/kendo.common.min.css"> <link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1119/styles/kendo.rtl.min.css"> <link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1119/styles/kendo.default.min.css"> <link rel="stylesheet"...
angularjs,kendo-ui,kendo-grid,kendo-datasource
Mihai Bazon provided a solution through a GitHub issue. There's an undocumented attribute called k-ng-delay which helps facilitate this exact scenario. He's working on adding it to the docs, and provided an example. <div id="grid" kendo-grid k-ng-delay="gridOpts" k-options="gridOpts"></div> I forked my JSFiddle example and updated it to use k-ng-delay: http://jsfiddle.net/ernestopye/ceKXg/2/...
kendo-ui,kendo-datasource,kendo-chart
Usually the x values in a series should not repeat, you have two options to fix your chart: Option 1: Define both series' values on each datapoint var internetUsers = [ { "S1Value" : 1, "S1base" : 2, "S2Value" : 3, "S2base" : 2, "date" : 2011 }, { "S1Value"...
jquery,kendo-ui,kendo-grid,kendo-datasource
That's how it's designed; a simple solution for your scenario would be to create a new DS which creates a copy of the data, then query that: var originalDS = this.get("productsSource"); var filterDS = new kendo.data.DataSource({ data: originalDS.data() }); var dirty = filterDS.query({ filter: { field: "dirty", operator: "eq", value:...
The schema will only take care of fetching and parsing the data that your DataSource needs in order to create views, filter, sort, etc. There is no built in way of handling "hybrid" content coming from one Ajax-request. You make a workaround, though. Use the requestEnd event, access the missing...
javascript,kendo-ui,kendo-grid,kendo-datasource
I have updated the fiddle for you http://jsfiddle.net/53pqe3mo/2/ But essentially you can override the default parser for the value being returned by adding the following: DefaultMonoCPP: { editable: false, type: "number", parse: function(e) { console.log(e); return kendo.parseFloat(kendo.toString(e,"c2")); } I have added the console.log line just to show you that the...
kendo-ui,kendo-datasource,kendo-combobox
I have fixed by using oData filtering.Here's my code. jsfiddle.net/MG89G/1497.
You should define a getFieldType function as: function getFieldType(dataSource, field) { return dataSource.options.schema.model.fields[field].type; } and using it would be: var fieldType = getFieldType(dataSource, "post_title"); Alternatively, you can extend KendoUI DataSource for defining a new method called getFieldType by doing: kendo.data.DataSource.prototype.getFieldType = function(field) { return this.options.schema.model.fields[field].type; } and using it would...