[Solved] - How to hide filter icon for all columns?

Hi,
I want to ask what is the simplest way to hide icons for all columns?
Can I set it up initially?
In the process of filtering for a specific column I only use the following code:
datagrid.allowfilter = true
datagrid.columns (). FilterPredicates ...
datagrid.allowfilter = false
Thanks you!

5 Replies

SS Susmitha Sundar Syncfusion Team May 11, 2020 12:56 PM UTC

Hi GridLock, 

Thank you for using Syncfusion controls. 

By default, AllowFiltering is true in SfDataGrid. So, Filter icons are shown for all the columns. If you want to hide, you should disable the filtering for SfDataGrid initially.  

this.sfDataGrid1.AllowFiltering = false; 
  
Please let us know if you need further assistance on this. 

Regards, 
Susmitha S 



TG The GridLock May 11, 2020 08:13 PM UTC

Ok, Susmitha!



SS Susmitha Sundar Syncfusion Team May 12, 2020 07:29 AM UTC

Hi GridLock, 
 
Thanks for the update. 
 
We are glad to know that the reported problem has been resolved at your end. Please let us know if you have any further queries on this. We are happy to help you. 
 
Regards, 
Susmitha S 



TG The GridLock May 19, 2020 07:46 AM UTC

Hi Susmitha,
If I still want to filter but don't display the icon, what do I need to do?
I tried 
.headerstyle.filteredicon = Nothing
.headerstyle.filtericonsize = new size(0,0)
but it also display as default.


SS Susmitha Sundar Syncfusion Team May 20, 2020 12:47 PM UTC

Hi khanh dang, 
 
Thank you for the update. 
 
If you perform the programmatically filtering, you can disable the AllowFiltering. AllowFiltering used for UI filtering only. So, you can hide the FilterIcon by setting the AllowFiltering property as false. 
 
Please let us know if you need further assistance on this. 
 
Regards, 
Susmitha S 
 


Loader.
Up arrow icon