Multiple value filtering

Hi,

How can i filter multiple value on filter column programmability ?

my column type gridnumericcolumn

thanks for helps



3 Replies

VS Vijayarasan Sivanandham Syncfusion Team January 28, 2022 02:09 PM UTC

Hi Serdar,

Your requirement can be achieved by applying multiple FilterPredicates for a column in SfDataGrid. Please refer the below code snippet,

 
sfDataGrid.Columns.Add(New GridNumericColumn() With { 
                                                                .MappingName = "OrderID", 
                                                                .HeaderText = "Order ID" 
                                                }) 
 
'Filter the OrderID column with values "1001" or "1003" 
sfDataGrid.Columns("OrderID").FilterPredicates.Add(New FilterPredicate() With 
 { 
                                .FilterType = FilterType.Equals, 
                                .FilterValue = 1001, 
                                .PredicateType = PredicateType.Or 
}) 
sfDataGrid.Columns("OrderID").FilterPredicates.Add(New FilterPredicate() With  
{ 
                                .FilterType = FilterType.Equals, 
                                .FilterValue = 1003, 
                                .PredicateType = PredicateType.Or 
}) 

Sample Link: https://www.syncfusion.com/downloads/support/forum/172370/ze/SfDataGridDemo-1165396540

For more information, please refer the below user guide documentation link, 


Regards, 
Vijayarasan S 



SE Serdar January 29, 2022 06:40 AM UTC

Hi  Vijayarasan,

Your code is work

thanks for help



VS Vijayarasan Sivanandham Syncfusion Team January 31, 2022 04:49 AM UTC

Hi Serdar,

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,
Vijayarasan S


Loader.
Up arrow icon