Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 413
Andrej Kaurin Avatar asked Feb 16 '12 15:02

Andrej Kaurin


3 Answers

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
like image 161
Burke Holland Avatar answered Sep 29 '22 10:09

Burke Holland


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.

like image 42
Lars Höppner Avatar answered Sep 29 '22 09:09

Lars Höppner


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;
}
like image 43
Rodolpho Brock Avatar answered Sep 29 '22 10:09

Rodolpho Brock