Search as you Type

Is it possible to search the Blazor data grid as you type?  By default, results are only searched when pressing the search icon or by hitting enter.  I'd like it to automatically search after a short debounce delay.


6 Replies 1 reply marked as answer

JP Jeevakanth Palaniappan Syncfusion Team August 25, 2020 07:11 AM UTC

Hi Matthew, 

Greetings from syncfusion support. 

We have validated your query and you can achieve your requirement by using the Custom Toolbar feature of Grid component. Using custom toolbar we can render the SfTextBox control and by using the ValueChange event of SfTextBox, we have filtered the Grid using Search() method. Please refer the below code snippet and the sample for your reference. 
 
<SfGrid @ref="DefaultGrid" DataSource="@Orders" AllowSorting="true" AllowFiltering="true" AllowPaging="true"> 
    <SfToolbar> 
        <ToolbarItems> 
            <ToolbarItem Type="ItemType.Input" Align="Syncfusion.Blazor.Navigations.ItemAlign.Right"> 
                <Template> 
                    @*Apply styles for Textbox accordingly*@ 
                    <SfTextBox Placeholder="Enter values to search" Input="OnInput"></SfTextBox> 
                    <span class="e-search-icon e-icons"></span> 
                </Template> 
            </ToolbarItem> 
        </ToolbarItems> 
    </SfToolbar> 
 
    <GridColumns> 
        .. 
        .. 
    </GridColumns> 
</SfGrid> 
 
@code{ 
 
    public void OnInput(InputEventArgs args) 
    { 
        this.DefaultGrid.Search(args.Value); 
    } 
} 
 

Documentation Link for reference : 


Please get back to us if you need further assistance. 

Regards, 
Jeevakanth SP. 


Marked as answer

GR greenlab replied to Jeevakanth Palaniappan November 14, 2021 06:11 PM UTC

Hi Jeevakanth SP,

The solution proposed works, however it adds an additional strip at the top of the grid header which decreases the screen view (unused space) not good for the UI in my opinion.  My question is:  

Is there a way to add the auto-complete functionality to the "Search" box within the Toolbar?





JP Jeevakanth Palaniappan Syncfusion Team November 15, 2021 01:20 PM UTC

  
Hi Justino, 

We are currently validating your query and so we will update the further details in two business days. Until then we appreciate your patience. 

Regards, 
Jeevakanth SP. 



JP Jeevakanth Palaniappan Syncfusion Team November 17, 2021 08:49 AM UTC

Hi Justino, 
 
Thanks for your patience. 
 
We have validated your query and currently we do not have support for this requirement. We have considered you query as an improvement “Need to provide immediate searching support for search toolbar in grid”. We are always trying to make our products better and feature requests like yours are a key part of our product growth efforts. At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technological feasibility, and customer interest. It will be implemented in any of our upcoming releases.   
  
You can also communicate with us regarding the open features any time using our Feature Report page and you can track the status of your requirement by using the below feedback link. 

Regards, 
Jeevakanth SP. 



MK Mustafa Kuyucu January 2, 2023 07:59 PM UTC


Hi Jeevakanth SP,


Were you able to add this blazor feature?

I could not find this feature in your product content. I would appreciate it if you provide information.







MS Monisha Saravanan Syncfusion Team January 3, 2023 12:32 PM UTC

Hi Mustafa,


Query: “Were you able to add this blazor feature?”


No we haven’t included this improvement. We have considered it as an uncertain improvement. At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technological feasibility, and customer interest. It will be implemented in any of our upcoming releases.   

  

You can also communicate with us regarding the open features any time using our Feature Report page and you can track the status of your requirement by using the below feedback link. 


https://www.syncfusion.com/feedback/30406/need-to-provide-support-for-immediate-searching-for-search-toolbar-in-grid 


Please let us know if you have any concerns.


Loader.
Up arrow icon