QtitanDataGridModel-view DataGrid component with rich functionality for Qt.C++ and PySideQtitanRibbonReplicates Microsoft RibbonUI interface for Qt.C++ and PySideQtitanNavigationDesignUIReplicates Microsoft Navigation Design interface for Qt.C++ and PySideQtitanChartCharts and Diagrams component for Qt.C++ and PySideQtitanDockingDockable Panels and Tool Bars for Qt.C++ and PySideQtitanFastInfosetXML Compressed format FastInfoset implementation for Qt.C++ and PySideRoadmap Development 2023
FireDataGridPowerful, modern, fast, DB-Aware Grid for Delphi-FiremonkeyFireDockingDelphi IDE/Visual Studio implementation of dock panels for Delphi-Firemonkey
We are currently using QtitanDataGrid v. 8.0, and we are experiencing the following issue: If the user focuses a row in the grid, and then refreshes the underlying model, for example doing select on an QSqlQueryModel, then the grid changes the focused row to the first row. On the old version we used, v. 5.9, this did not happen, the grid correctly maintained the focus on the currently focused row after the refresh. Is there any way we can achieve this behavior with version 8.0? It causes a lot of work for us because we now need to save the old focused row before the refresh, in order to manually re-focus it after the refresh.
Any update on this? Even if returning to the old way of focusing is just not possible it would be nice to know it, so we can do the workarounds we need to do, currently we are waiting for a possible fix. Thanks.
There was a bug in the old version and we fixed it. The thing is that when the model is refreshed, the grid considers this model be a completely new and therefore the focused row is positioned at the very beginning. Since there is no guarantee that the new focused row refers to the same data as it was before the model was refreshed.
Related to the same subject: after a model refresh, is there also no way of maintaining the filter the user has applied on the dataset? Could you give an example snippet of how we could at least save the filter and re-apply it after we do the refresh?
Thank you
The filter, sorting and grouping should not be reset on model refreshing. Could you describe the problem in more detail? Do you have a simple example to reproduce the problem?
Hi, it seems to me the filter is not really removed internally, but the filter panel disappears and the filter is no longer applied. I have made a workaround that checks if there is a filter applied before the model refresh, and if so, after the refresh it calls showFilterPanel() which makes the panel re-appear and the filter to be re-applied. I have attached a minimum.cpp file that shows the situation. I have not attached the other project files as I think only the .cpp is relevant to see the issue. There is a button that refreshes the model, and there I have described the problem and my current workaround.
Thanks