At the moment, the DataSource only uses one field for its ID property (if you enter several, then only one is used, apparently). This doesn't reflect reality, in that in many cases (where one record is a child of another), the key field for a database table is a composite (from 2 or more fields). The existing situation causes problems in inline editing of the KendoUI grid, because default values need to be set for foreign key fields, but if these are set to a valid value, then spurious calls to the Inline_Create method occur because the DataSource treats the record as a new record when it is not. In any case, allowing multiple fields would simply reflect reality.
Hi Team,
I would like to request a way to use the Kendo UI DataSource with a flag set to state that it is returning a singular record. For my case, my dataSource is using OData V4, and it requires utilizing an Ajax request to retrieve an individual entity.
var dataSource = new kendo.data.DataSource({
type: "odata-v4",
transport: {
read: function(options) {
$.ajax({
//makes a request for an individual entity by ID
url: "https://demos.telerik.com/kendo-ui/service-v4/odata/Products(1)",
//....
}
},
//....
});
It would be nice if there was a better way to do this.
Thank you!
Bug report
Insert on a node's children when using index of 0, аppends item wrongly to PanelBar
Reproduction of the problem
Dojo: https://dojo.telerik.com/iruWAwoy
Click the Insert button to see where the item in the PanelBar goes.
Environment
Kendo UI version: [all]
Hi Team,
I would like to request the functionality to set the dataSource.model.id with a function handler rather than just a string.
The usefulness behind this in my case is the mixing of dataTypes in the Kendo UI PanelBar. We are trying to mix the data in the results returned and do not currently have a common structure/object representing the data.
Thank you!
When the grid is configured for working with UTC on the server-side, the value sent from the filter menu on the client-side would not be properly sent to the server.
If the stringifyDates option of the transport of the data source is set, the value would still be sent in a localized date format without information for the time zone, for instance, GMT(+0300).
In case the value sent from the client is modified, the parameterMap would be called afterward and would override the modified value.
Moreover, the Kendo UI Binder on the server-side is not configured to be working with dates that have additional data for the time zone appended to the end. Therefore, sending the modified data would not be parsed correctly and FormatException error would be thrown.
See DoJo
This calls the DataSource read() method 10 times, but after 10 seconds only 2 of them are resolved (and actually only 2 requests are recorded in dev tools).
This is really annoying when relying on logic in a .then() block, because it is never called in the remaining cases.
Is there any way to listen spreadsheets filter or bind one more event after spreadsheet filter method?
In MDX you can sort the data you query for using the order function, specifying a set, a value to sort by (most commonly a measure) and the direction and whether to break hierarchy or not. I appreciate that hierarchy-breaking sorting might be quite difficult to pull off nicely, but I believe the MDX could be generated in such a way to support sorting, by specifying one of the members on an axis and the measure.
One of key areas for enterprises is data security. If we can add the capability of encrypting data via kendo datasource, it would be awesome. This encryption should automatically happen when data is received from a service using the encryption algorithm specified as an attribute of kendo datasource. Similarly, decryption should also happen when the datasource receives the encrypted data.
I selected the grid widget for this ticket, but the question is for all widgets with a remote filter service. I'm not finding a way to configure the DataSource to send the field data types, as defined in the schema, along with the filter request. The filter request array includes the field name, field value and ignore case values. It needs to also include the field data type, from the perspective of the DataSource.
I know that I can parse values on the server side to try to guess the data type, as with the example applications, but that's not reliable in all cases, and I don't want to do that. It's better to know the field type based on the perspective of the widget.
Hopefully I'm just missing the DataSource configuration option to 'Include Field Data Types in Filtering Requests'. If that doesn't exist, please add it as an enhancement request, and let me know the most effective way to accomplish this that will work for all widget and data source combinations. I figured out that I can do this with a grid:
parameterMap: function (data, type) {
var fields = $("#grid").data("kendoGrid").dataSource.options.schema.model.fields;
var types = {};
for (let key in fields) {
types[key] = fields[key].type;
}
return $.extend({types}, data);
}
But I also have a Kendo Form with a form field edit of type MultiColumnComboBox, and the same approach will probably work, but I have to figure out how to get at the schema configuration in that case, and probably other combinations in the future.
The filter row is really nice, but for more flexibility it'd be nice to not hit the server until a user has populated the row with all the filters they want. The way it works now is if you tab out/hit enter/select dropdown list item/etc. it hits the server. The ability to filter when the user explicitly wants to isn't really there.
Currently kendo.DataSource.get() and kendo.Datasource.getByUid() methods are very slow in case there some non-trivial amount of data stored. Actually, these methods loop on all items in dataSource on each call. Why not add index for id field? Indexed access can boost up many real-life scenarios. I prepared following jsfiddle to demonstrate the slowness: http://jsfiddle.net/terikon/eb3tsjzf/9/
Add Event handlers after Batch Edit, Save Changes
There are several undocumented methods on the data source which provide some really nice functionality. The DataSource is able to store multiple 'pages' of data in an internal collections of ranges that can be accessed and populated by the range() and prefetch() methods. It looks like this is used mostly to support virtual grid scrolling, but I have found it very useful for other applications where a data source uses server operations. This is a really great feature and I'd like to see it officially supported in the future!
We use a DataSource with a custom transport and read method to filter some data on the server.
return new kendo.data.DataSource({ pageSize: 10, serverPaging: true, serverSorting: true, serverFiltering: true, type: "json", sort: { field: "name", dir: "asc" }, transport: { read: function (options) {}....
As the user types we issue a read request but it would be nice to have a way to cancel the last read request with a method call (ie. abortRequest() or abortReadRequest() ). We can implement a work around as shown here https://dojo.telerik.com/@Dimitar-Goshev/IxaLUtIw but I think it would be reasonable feature to simply have this internalized into the DataSource code so that the abort logic is internal to the DataSource class.
Currently, when binding an observable viewModel to a date/time picker control, only date formats built in to the widgets ( a minimal set) and formats specified implicitly by the ParseFormats option. I understand the reason for this being to prevent users from being able to type a date or time into the widgets in a format other that what is deemed appropriate for the widget, but it should behave differently when being bound from a view model. Different platforms and web APIs serialize dates in different ways and developers should not have to always write a custom parser into the kendo datasource schema for each datetime property of an object or have to specify the ParseFormat on the widget just so it can be bound properly to a date/time picker widget. In the latest release (as of this posting) the parsing of Microsoft's JavaScriptSerializer date format has been added, ignoring the ParseFormats of the widgets. This is a great step in the right direction, however the W3C standard ISO 8601 date format is not being parsed while bypassing the ParseFormats of the widgets. Also, currently, the date parser will not allow parsing of ISO 8601 date strings with more than 3 decimal places for fractions of a second. Both Microsofts DateTime.ToString("O") and Newtonsoft's Json.Net's ISO serialization of dates output 7 decimal places for fractions of a second. (I have been in contact with the kendo team about this specifically and they are going to add support, however they are not currently planning to make it bypass the parseformats unless the community votes for it here on UserVoice). Since Kendo has specific functions used for binding widgets and elements, they should be able to easily make it so all parseformats (built-in and implicitly specified) are used when parsing dates that are set using binding to widgets expecting an actual date object and not a string (the date/time pickers).
The HiearchicalDataSource should support XML data binding. If not, then the examples and documentation should be updated until that support is present.
Would be good to have ability to to something like this on an observable object: o.set({ a: 1 }) I.e. pass an object to the set function to update/add properties in o from that object.
Make spreadsheet support virtual scrolling as the grid does in this example - https://demos.telerik.com/kendo-ui/grid/virtualization-remote-data This allows handling of much larger datasets than other methods of data binding.