Se focus to filterSearch textbox

Good morning,

I have a grid like this:

<SfGrid DataSource="@Dados" Toolbar="@(new List<string>() { "Search" })" AllowPaging="true" AllowSorting="true" AllowResizing="true" AllowReordering="true" AllowFiltering="true">

The search filter works OK, but I'd like to set focus to it when the page initializes. How can I achieve that?

Another thing, how do I do the search accent insensitive?


Thanks in advance!


4 Replies

NP Naveen Palanivel Syncfusion Team May 30, 2022 04:26 PM UTC

Hi Tarsis,


Sorry for the Inconvenience.


We are currently checking the reported query at our end and we will update the further details within two business days(June 01, 2022). Until then we appreciate your patience.


Regards,

Naveen Palanivel.



NP Naveen Palanivel Syncfusion Team June 1, 2022 05:49 PM UTC

Hi Tarsis,


Thanks for your patience.


We have confirmed this as an issue and logged the defect report “Focus to filtersearch textbox” for the same. Thank you for taking time to report this issue and helping us to improve our product. At Syncfusion, we are committed to fix all validated defects (subject to technological feasibility and Product Development Life Cycle) and this fix will be included in our upcoming patch release which is expected to be rolled out on or before 31st  June 2022.


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. 

      

https://www.syncfusion.com/feedback/35346/not-able-to-focus-the-search-textbox-externally


Until then we appreciate your patience.


Regards,

Naveen Palanivel.



NP Naveen Palanivel Syncfusion Team July 4, 2022 06:13 PM UTC

Hi Tarsis,


Sorry for the Inconvenience.


we are not able to include the reported problem “Focus to filtersearch textboxin our mentioned patch release as promised. We have planned to include this in our upcoming patch release which is expected to be rolled out by 27th July 2022.

Till then we appreciate your patience.    


Regards,

Naveen Palanivel



NP Naveen Palanivel Syncfusion Team August 2, 2022 04:38 AM UTC

Hi Tarsis,


Sorry for the Inconvenience caused


We checked you query and as per requirement we prepared sample for at initial grid rendering focus at search toolbar. We attached the sample in this ticket, please kindly refer the sample and snippet code for your reference.

 

<SfGrid..

 

<GridEvents DataBound="DataBoundHandler" TValue="Order"></GridEvents>

 

</SfGrid>

 

@code{..

 

  public async Task DataBoundHandler()

    {

        

        await JSRuntime.InvokeVoidAsync("focus");  // called interop function for focus the searchbox at initial load

    }

 

}

 

[Interop.js]

function focus() {

   

    var textbox = document.getElementsByClassName('e-searchinput e-input')[0];

    textbox.focus();

  

}

 


Please get back to us if you have further queries.


Regards,

Naveen Palanivel.


Attachment: BlazorApp1_(2)_4c21a35a.zip

Loader.
Up arrow icon