Can I catch an event fired by filter event? With this way, Can I take a returned row/rows after filtering?
With the Kendo UI grid you can enable filter row in its header by setting the grid's filterable->mode property to row.
kendo:grid-pageable-messagesThe text messages displayed in pager. Use this option to customize or localize the pager messages.
Returns the data item to which the specified table row is bound. The data item is a Kendo UI Model instance. When using the Grid's MVC wrapper, the Grid must be Ajax-bound for the dataItem() method to work.
Solution. On the dataBound event of the grid, find the filter dropdown and select() the desired default filter option. On the filter event of the Grid, if the filter is cleared, select the desired default filter option.
Like Kendo say in API reference: "The change event of the dataSource is fired when the data source is populated from a JavaScript array or a remote service, a data item is inserted, updated or removed, the data items are paged, sorted, filtered or grouped."
Anyway you can't detect if that was filter or other event of type "read" fired. If you need it, you have to check the filter configuration in grid dataSource for any changes.
Returned rows are in the items property of the change function argument. Code:
$("#grid").kendoGrid({
dataSource: {
change: function(e) {console.log(e.items);},
},
Example: http://dojo.telerik.com/iPEko
API Reference for dataSource change event.
API Reference for dataSource filter method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With