I have a table with rather many fields a primary key.
It would be nice to edit them line by line.
TDynamikGrid does not allow this, does it?
It will offer a horizontal scroll bar and the user would have to search for the field on scroll on and scroll on?
If yes, how to work on as best practice, I am not sure, it this is wise:
I would write one query and connect them to a variety of datasensitive DBEdits.
Those I can group nicely and the user does not need to scroll.
What I am not sure about: Is there any disadvantage, if I work with a lot of edits at the same and query "online"?
I assume that you are referring to TIBDynamicGrid which is part of the IBControls package, available from
https://github.com/MWASoftware/ibcontrols and OPM.
As long as the dataset is editable then row by row editing should be automatic. Just click on the cell you want to edit and the row should go into edit mode (the row's left hand indicator icon will change to the edit icon from the pointer icon). Any changes you make are posted when you select a cell in a different row. The only time this does not work when there is no editor available for the field type (e.g. a binary blob).
You can also edit a row using discrete contols (e.g. a TDBEdit). You do this by putting a TPanel on the form and linking it to the dynamic grid's "EditorPanel" property. You can place any data aware controls you want on this panel and in any layout that suits you. This includes images. The only constraint is that you must set each such control's datasource property to the same datasource as that used by the Dynamic Grid.
When you execute your program, the dynamic grid will look like it normally does. However, when you click on the grid's left indicator button (for a given row), the row will be replaced by the panel with the data aware controls showing the current row values. You don't have to include the same fields in the grid's row as are on the panel. The fields displayed by the grid may be just the most commonly viewed, while the panel can contain the detail.
For an example, see the "employee" example in IBX4Lazarus.
I hope this helps.