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?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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
回答2:
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.
回答3:
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;
}