How to find string in grid without enter key press

I have an sfgrid in my application.I have enable auto filter.Its works Only when I press enter key  after entering the text.Please advise how to use autofilter without enter key press

1 Reply 1 reply marked as answer

VN Vignesh Natarajan Syncfusion Team June 9, 2021 03:21 AM UTC

Hi Hassan,  

Thanks for contacting Syncfusion support.  

Query: “I have enable auto filter.Its works Only when I press enter key  after entering the text.Please advise how to use autofilter without enter key press 

We have analyzed your query and we would like to inform you that by default FilterMode of Grid component will be OnEnter. Hence Enter key has to be pressed after typing a value. We request you to achieve your requirement by changing the Mode of GridFilterSettings to Immediate.  

Refer the below code example 

<SfGrid DataSource="@Orders" AllowFiltering="true" AllowPaging="true"> 
    <GridFilterSettings Mode="FilterBarMode.Immediate" ImmediateModeDelay="300"></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> 
  
We have already documented this topic in our UG documentation which can be referred from below  


Please get back to us if you have further queries.  

Regards, 
Vignesh Natarajan 


Marked as answer
Loader.
Up arrow icon