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!
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!
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.
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.
Hi Team,
I would like to request the functionality to include data flags within the Kendo UI DataSource similar to the JQuery Data Tables. They allow you return multiple flags and messages so long as you always name the display list the same name in the JSON. I would rather not use Form Data.
Thank you!
https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API
Hi
I was just wondering if there was a message bus /Broadcast Channel component that was part of kendoUI.
I am thinking you could use your Observables or or something like the MVVM tooling.
just that the mozilla example does not work, it may be way out of date
thanks in advance
Doug
It would be nice to be able to specify in a datasource filter two fields and an operator for the sake of data reporting. For example, where "completed date" is greater than "promised date" or "Actual cost" is greater than "estimated cost."
This sort of thing can be accomplished by calculated fields; a filter of where "cost overage" is greater than 0. The down side of the calculated field approach is all comparisons need to be pre-defined.
Provide a data source setting and functionality that all the dates be created as UTC replacing the need to write the requestEnd code everywhere:
It would be very helpful not to have to do this in every scenario that requires using UTC dates and have the data source create the dates in UTC as they reach the client.
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.
This is more of a feature request...
If I want to refresh a datasource every 60 seconds, be it a grid, a dropdown, etc., I have to add a snippet of code something like this:
var interval = 60000;
setInterval(function()
{
$("#my-grid").data("kendoGrid").dataSource.read();
}, interval);
Yes, I realize this is trivial, but it would be nice if you could add an AutoRefresh function directly to the DataSource API that handled all of this under the covers. Example:
.DataSource(dataSource => dataSourcehttp://odata.github.io/WebApi/#04-26-InOperator
OData v4 now supports the IN operator as a short hand for multiple or queries (as of http://docs.oasis-open.org/odata/new-in-odata/v4.01/cn01/new-in-odata-v4.01-cn01.html#_Toc485385090 ). This could help to change code such as:
var selectedStations = $("#cmbStations").data("kendoMultiSelect").dataItems();
var stationIds = [];
for (var i = 0; i < selectedStations.length; i++) {
stationIds.push({
field: "StationId",
operator: "eq",
value: stationId
});
}
dataSource.filter({
logic: "or",
filters: stationIds
});
into a much cleaner:
var selectedStations = $("#cmbStations").data("kendoMultiSelect").dataItems();
var stationIds = [];
for (var i = 0; i < selectedStations.length; i++) {
stationIds.push(selectedStations[i].StationId);
}
dataSource.filter({
field: "StationId",
operator: "in",
value: stationId
});
The DataSource schema must be given a total value in order to page correctly. However, DataSource expects this value to come from a response body field. In some cases, we must work with systems that return the total value as a custom field in the response header. We need a way to read custom response header values. Yes, the DataSource transport uses jQuery.ajax, so we can implement a custom complete function to read the response headers from the jqXHR. However, complete fires AFTER schema.total is set so it does no good.
We use the new version of SignalR which is 2.2.3 currently and it seems the Kendo DataSource cannot bind to it. It would be awesome if Kendo supported it. Here is a link: https://www.nuget.org/packages/Microsoft.AspNet.SignalR.Core/
When you have multiple spreadsheet components on the same HTML page, allow them to cross reference each other, similar to the existing referencing capability across multiple tabs (like worksheets) but across completely separate objects (like workbooks) - of course they would need to be on the same page.
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.
IMHO it would be good to separate the DTOs and the serializer/deserializer into separate assembly packages and document the protocols used to communicate with telerik components as developers may create multi layered applications without having to deploy the full telerik package eg. in business logic layers or data access layers
Please consider adding support for the new improved Signalr core to be used as an async data source and or server side rpc which would allow for greater mvvm spa applications