Answer the question
In order to leave comments, you need to log in
How to do it right? Lots of tables and PageControl in Delphi
Hello, the problem is this: I
have my own business, I am engaged in car rental, and I decided to make a program for myself to account for clients, active orders, car database, etc. There are several sections: clients, orders, cars, black list. Each section stores tabular data.
I see 2 ways to manage all this:
1. Create a PageControl, 4 pages, each of which will host a DbGrid. Each section has its own grid and its own Query.
2. Create one grid and 1 Query. When choosing a section in the navigation menu, make a request from the corresponding database for the selection.
What method, from the point of view of programming, is better? Am I correct, or do I need to do something completely different? Thank you.
Answer the question
In order to leave comments, you need to log in
It is better to use Tabcontrol rather than PageCOntrol
create Tabstrings on it
Tabcontrole insert one dbgrid + query into Onchange handlers select
by tabindex..
This avoids using 4 grids etc.
1. Create a PageControl, 4 pages, each of which will contain a DbGrid. Each section has its own grid and its own Query.
2. Create one grid and 1 Query. When choosing a section in the navigation menu, make a request from the corresponding database for the selection.
What method, from the point of view of programming, is better? Am I correct, or do I need to do something completely different? Thank you.
The first is easier. Just sketch on the form you need and write a few lines.
The second is a little more complicated, but in my opinion more accurate. And less hassle in the future :)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question