![]() The Sort property is the widestring value indicating the "ORDER BY" part of the standard SQL query – of course you do not need to write the SQL query to be able to use the Sort property.īelow you can find the code for the OnTitleClick even handler that sorts the records by column click. If you are using ADO approach to Delphi database development, and want to sort the records in the dataset, you need to set the Sort property of your AdoDataset (ADOQuery, AdoTable). SORT ON COLUMN CLICK? CHANGE FONT OF THE SORT COLUMN TITLE? (Sender: TObject Shift: TShiftState X, Y: Integer) The code below simply uses the MouseCoord property of the DBGrid component to "calculate" where the mouse pointer is – if over DGBrid title area, the pt.y equals 0, which is the first row in the DBGrid – the title area (displaying column/field titles). ![]() All you have to do is to add the code to the OnMouseMove event for the DBGrid component. ![]() All the component names were left as Delphi named them when dropped on the form (DBGrid1, ADOQuery1, AdoTable1, …)įirst, let's see how to change the mouse pointer while it moves over the DBGrid title area.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |