Forum
Sign Up
× DataGrid for Qt.C++

QSqlTablelModel::removeRow with OnManualSubmit

3 months 2 weeks ago #1 by Mark Braue
Hi,
i have a QSqlTablelModel setup with OnManualSubmit. I want to change Data and remove rows from more than one model and submit it together in one transaction.

If i remove a row with model->removeRow(), the removes row stays visible in the grid. In QTableView the is an Asterics that shows that the row will be deleted. In QtitanGrid i found nothing like that.
Is there a way to show the deleted-flag, or better a way to hide the row without submit it back to the database?
More
3 months 2 weeks ago #2 by Developer Machines
At the moment such rows are not highlighted for the user. They are always empty. Is implied that you need to make the submit manually so that the changes take effect. In what cases, you may need to ignore the model submission procedure and display such a rows with the * sign?

If QTableView knows how to identify such rows, we can do the same in theory.
More
3 months 2 weeks ago #3 by Mark Braue
I have a header-table with more than one position-tables. if the user press the cancel-button, than i want to revert all changes in all tables. if i make a manual submit before to remove the deleted rows from the view, the revert will not work anymore.
So i think i have to work with temporary tables where i can make the submit.
More
3 months 2 weeks ago #4 by Developer Machines
If you know how QtableView identify the deleted rows, i'd suggest to apply the filter to the gird to hide that rows. Please see CustomFilter.exe demo example. You can try to assign filter conndition to:

view->modelController()->filter();
or
view->modelController()->relationFilter(); //In this case the filter panel will be ignored.
More
  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to add attachements.
  • Not Allowed: to edit your message.
Moderators: Developer MachinesEduard
Time to create page: 0.120 seconds

Developer Newsletter

Join our Developer Machines newsletter to get informed on all the latest releases of the commercial components for Qt.C++, Delphi FireMonkey, updates and general knowledges.

Quick Support

Should you need any additional information about our products or licensing, please contact us at the following email addresses:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

Get in Touch

If you would like to purchase our products or services, but don’t know how to do it the right way, please feel free to contact us:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.( any questions related to our products or services )
  • This email address is being protected from spambots. You need JavaScript enabled to view it.( questions related to licensing )