2014-09-04 60 views
2

有沒有辦法捕獲劍道網格上的過濾器已更改事件?我需要在頁面上更改過濾器時運行一些邏輯。捕捉Kendo UI網格過濾器已更改事件

http://demos.telerik.com/kendo-ui/grid/filter-menu-customization

+0

有你試過這個? http://stackoverflow.com/questions/20446071/i-want-to-display-the-applied-filter-criteria-on-the-kendo-ui-grid – 2014-09-04 20:30:25

+0

你使用什麼過濾?服務器或客戶端 – cwishva 2014-09-05 06:06:10

+1

嘗試[this](http://www.telerik.com/forums/any-filtering-event) – 2014-09-05 06:11:56

回答

2

你只需綁定的數據源「變」事件,這一事件將過濾器運行後,被解僱(以及在其他時候一樣,當你填入的數據源)

dataSource: { 
    data: createRandomData(50), 
    schema: { 
     model: { 
      fields: { 
       City: { type: "string" }, 
       Title: { type: "string" }, 
       BirthDate: { type: "date" } 
      } 
     } 
    }, 
    change: function(e) { 
     Console.log('filtered'); //this will fire after filtered. 
    }, 
    pageSize: 15 
},