The TDBGrid control in Delphi Firemonkey is no longer available. How to achieve an effect similar to this. In fact, it can be achieved using TGrid. The following uses 11.3 to explain.
The general database usage of the connection and query controls used in the query will not be described too much. Please refer to other information.
Method 1. Realize through interface configuration
Put the TStringGrid control StringGrid1, TBindSourceDB control BindSourceDB1, TBindingsList control BindingsList1, and TButton control Button1 into the interface.
Set the corresponding query control name in the dataset attribute of bindsourceDB1 .
Double-click the bindingslist1 control,
Add a TLinkGridToDataSource control
Set the DataSource property and GridControl property
You can see the effect as follows.