How do you extend Kendo UI widgets
سؤال
I couldn't find any official documentation about extending Kendo UI widgets or making composite controls on Kendo UI's website. Are there any examples of how to do this?
المحلول
I'm about to write a post on this, but you can checkout the following project on GitHub for creating plugins. Currently there is a composite control for this...
https://github.com/kendo-labs/kendo-plugins
Here is a live fiddle example of a compositing an AutoComplete and a ListView...
http://jsfiddle.net/burkeholland/G2f4a/embedded/result/
// thanks for making put a useless comment here stackoverflow
نصائح أخرى
There's official documentation now: How to Create a Custom Widget
Here's a link to semi-official community plugins.
And here are some examples of widgets created by John DeVight.
An SO post showing a simple example which extends the mobile list view.
Thanks! With this help I can do that:
kendo.data.DataSource.prototype.dataFiltered = function () {
// Gets the filter from the dataSource
var filters = this.filter();
// Gets the full set of data from the data source
var allData = this.data();
// Applies the filter to the data
var query = new kendo.data.Query(allData);
// Returns the filtered data
return query.filter(filters).data;
}