Data Grid 2 search causes refresh/loading and cursor focus loss only in deployed environments

0
Hi everyone,I'm facing an issue with a Data Grid 2 search filter (Data Widget Version 2.27.3).ScenarioData source: XPath (persistent entity)Data Grid 2 is placed inside a Data ViewThe Data View is populated by a microflow, but that microflow is not being re-triggered when typing in the search field.ProblemWhen I type in a search filter:Local environmentSearch works smoothly.No visible loading/spinner.Cursor remains in the search field while typing.Deployed environmentsWhen I type, the grid shows a loading spinner.The grid refreshes/reloads.The cursor loses focus and is pushed out of the search field after each keystroke (or during the refresh).The entire grid briefly disappears while loading.What I have checkedData grid Data source is XPath, not a microflow data source.Data View microflow is not executed again when the issue occurs.Network tab shows retrieve requests from the Data Grid.The behavior occurs only in deployed environments, not locally.Has anyone experienced Data Grid 2 losing focus during search only in deployed environments?Could this be related to a specific Data Grid 2 widget version in Mendix 9.24.29?Are there known issues where the grid gets re-rendered during filtering, causing the search input to lose focus?What would be the best way to identify what is triggering the grid refresh when neither the page Data View nor its microflow is refreshed?Any suggestions or troubleshooting steps would be greatly appreciated.Thanks!
asked
2 answers
0

Hi,
Since you are facing it only in the deployed version try these:

  1. Increase the delay on the search filter. In the filter’s properties, raise the “Apply after (ms)” value (try 1000) so the grid only fetches once you stop typing.

  2. Check if the Data View is refreshing. Even if the microflow doesn’t re-run, something may be committing or refreshing the Data View’s context object (an event, a nanoflow, or a Java action). That rebuilds the whole grid, which would explain why it briefly disappears.

If something is still off after that, share the error or a screenshot and I’ll take a look. If this fixed it, please mark the answer as accepted so it helps others with the same problem.

answered
0

Hi Shefaly,

Since the issue occurs only in deployed environments, I would first investigate the grid refresh behavior and the response time of the server-side XPath queries.

Data Grid 2 uses server-side paging and filtering when configured with a Database/XPath data source. Therefore, searching can trigger requests to the runtime without re-executing the surrounding Data View microflow.

I recommend checking the following:

1. Check the Data Grid 2 refresh configuration

  • Open the Data Grid 2 properties.

  • Check Refresh Time (in Seconds) and set it to 0 to disable automatic refresh while troubleshooting.

  • Check whether any page-level timer, scheduled refresh, or custom JavaScript is refreshing the grid or its parent Data View.

  • Ensure the grid is not being conditionally destroyed and recreated while the user types.

2. Inspect browser Network requests in the deployed environment

Open Developer Tools → Network, enable Preserve log, and type a search value slowly.

Check:

  • Whether a new data retrieval request is triggered for every keystroke.

  • How long each request takes.

  • Whether previous requests are still pending when subsequent requests start.

  • Whether the server returns errors or unusually large responses.

This will help identify whether the loading behavior is caused by slow database queries, network latency, or repeated refresh requests.

3. Optimize the XPath query

If requests are taking too long:

  • Review the XPath constraints and associations.

  • Check whether the filtered attributes have appropriate database indexes.

  • Avoid retrieving unnecessary records.

  • Configure a reasonable page size.

  • Review runtime logs and database query performance in the deployed environment.

4. Check the filter configuration

If you are using separate Data Grid 2 filter widgets, verify their On Change events. Ensure that no custom microflow or nanoflow is refreshing the parent Data View or replacing the grid while the user types.

5. Verify the widget version

Test the latest Data Widgets version compatible with your Mendix Studio Pro version in a separate branch. Review its release notes and test the deployed application before upgrading Production.

My recommendation:

Start by setting the grid's Refresh Time to 0, then inspect the Network tab while typing. This will help establish whether the grid is being refreshed automatically or whether normal server-side filtering requests are taking too long.

Official references:

Hope this helps! If you find this answer helpful, please mark it as the accepted answer.

answered