Checkbox column filter with custom values

Hello,


We have a grid column like this: 


<GridColumn Field="ColumnName"
                        HeaderText="ColumnName"
                        Width="100"
                        [email protected]
                        FilterSettings="@(new FilterSettings{Type = FilterType.CheckBox })">
    </GridColumn>

The displayed checkboxes are all the possible values from the data that we have

Is it possible to include more values for the checkboxes which are not available in our current data source?


Kind Regards,

Tsvetan


2 Replies 1 reply marked as answer

RN Rahul Narayanasamy Syncfusion Team September 27, 2021 12:32 PM UTC

Hi Tsvetan, 

Greetings from Syncfusion.  

Query: The displayed checkboxes are all the possible values from the data that we have Is it possible to include more values for the checkboxes which are not available in our current data source? 

We have validated your query and we suspect that you want to provide a custom data to the Checkbox Filter. If so, currently we do not have support for this. We have considered this requirement as an usability improvement feature and logged the improvement report for the same. Thank you for taking the time to request this improvement “Need to provide support for providing custom datasource for Checkbox/Excel filter list datasource” and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle ) and including the improvement feature in our upcoming Volume 3, release 2021 which is expected to be rolled out by end of September, 2021. Until then we appreciate your patience.    
    
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.      
   
  
Regards,  
Rahul  


Marked as answer

RN Rahul Narayanasamy Syncfusion Team October 4, 2021 12:56 PM UTC

Hi Tsvetan,  
  
We are glad to announce that our 2021 Volume 3 release v19.3.0.43  is rolled out.   
 
  
We have included the improvement Need to provide support for providing custom datasource for Checkbox/Excel filter list in our latest releases. So please upgrade to our latest version for latest fixes and features.  
 
  
Please find the below code snippet and the sample for your reference below.  
@using Syncfusion.Blazor.Grids  
  
<SfGrid DataSource="@Orders" AllowFiltering="true" AllowPaging="true" Height="375">  
    <GridEvents OnActionBegin="ActionBegin" TValue="Order"></GridEvents>  
    <GridFilterSettings Type="Syncfusion.Blazor.Grids.FilterType.CheckBox"></GridFilterSettings>  
    <GridColumns>  
        <GridColumn Field=@nameof(Order.OrderID) HeaderText="Order ID" TextAlign="TextAlign.Right" Width="120"></GridColumn>  
        <GridColumn Field=@nameof(Order.CustomerID) HeaderText="Customer Name" Width="150"></GridColumn>  
        <GridColumn Field=@nameof(Order.OrderDate) HeaderText=" Order Date" Format="d" Type="ColumnType.Date" TextAlign="TextAlign.Right" Width="130"></GridColumn>  
        <GridColumn Field=@nameof(Order.Freight) HeaderText="Freight" Format="C2" TextAlign="TextAlign.Right" Width="120"></GridColumn>  
    </GridColumns>  
</SfGrid>  
  
  
    public void ActionBegin(ActionEventArgs<Order> args)  
    {  
        if (args.RequestType.Equals(Syncfusion.Blazor.Grids.Action.FilterBeforeOpen) && args.ColumnName.Equals("CustomerID"))  
        {  
//You can set the customized datasource here  
            args.CheckboxListData = Orders.Take(5);  
        }  
    }  
  
  
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.  
  
Regards,  
Rahul 


Loader.
Up arrow icon