DropDownDataGrid Virtual Keyboard Popup

Is there a way to stop the virtual keyboard from popping up when a user clicks on a DropDownDataGrid that has filtering? Is there a property that can be set to stop the filter search from getting the focus by default?

On a mobile, this is really annoying as the screen real estate is small so when you click to drop down you don't want the keyboard popping up and taking up half the screen when the item you want to select might be one of the top few. It just becomes a messy user experience and filter should be an extra press should you need to use it. Clearly not an issue on a desktop.


You can control this behavior in the way you need:

function isMobile() {
   return /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini|mobile/i.test(navigator.userAgent);

You will need however to turn off the prerender if turned on.

Thanks for the quick reply. The problem is that I still want to include the search as it's very good and useful, I just don't want it to auto-focus on the search box and thus pop up the keyboard. Is there a property to still show the search but not autofocus on it and give focus to the grid instead?


There is no such property however we accept pull requests.

1 Like

I'm not familiar with the pull request process sorry. I believe I can see the line of interest. Line 100 in the source of RadzenDropDownDataGrid.razor.cs inside OpenPopup method.

await JSRuntime.InvokeVoidAsync("Radzen.focusElement", isFilter ? UniqueID : SearchID);

I think a new parameter, FocusFilterOnPopup with a default set to true and then wrap the above with if (FocusFilterOnPopup) should do the trick and continue to work as it currently does unless set to false.

This would definitely improve the user experience when run on a mobile device.


1 Like