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!
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.
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.
Hi Tarsis,
Sorry for the Inconvenience.
we are not able to include the reported problem “Focus to filtersearch textbox” in 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
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.