This is a migrated thread and some comments may be shown as answers.

How to detect the Grid is filtered

1 Answer 358 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bilal
Top achievements
Rank 2
Bilal asked on 16 Jun 2015, 07:37 AM

Hi,

I am using the Grid with inline filter on column header. Users are getting confused as they dunno when the Grid is filtered.

 My first thought is to show a message above the Grid with red font saying that Grid is filtered. However, I couldn't find an event on Grid to let me know when the Grid is filtered. is there such thing?

 

Thanks,
Bilal

1 Answer, 1 is accepted

Sort by
0
Plamen Lazarov
Telerik team
answered on 18 Jun 2015, 06:16 AM

Hello Bilal,

When the grid is being filtered the background of the filter icon is changed. / screenshot /. You could also use CSS to change the icon's background with a suitable color in order to indicate that the grid has been filtered. However if you would like to show a message when the grid is filtered you could use the Grid's databBound event and check if filter is applied to the dataSource. 

dataBound: function(e){
if(this.dataSource.filter()){
  ...
}

 

Regards,
Plamen Lazarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Bilal
Top achievements
Rank 2
Answers by
Plamen Lazarov
Telerik team
Share this question
or