Re: Delphi: sorting records from a DBgrid
Posted by webmaster Guido on December 05, 2003 at 18:21:53:
In Reply to: sorting record from a DBgrid posted by martin -12330 on November 29, 2003 at 21:30:06:
: 1.what coding procdure will i write to sort record say in a database of students where i want only female students from only the display records form the dbgrid and not from the table.
1. The first step would be the filtering of the records, leaving you with only female students AND also in the grid, if I understand you well.
Next, you don't have to write any code to "sort" the records, Delphi does this for you if you either "index" this second table, or if you use a TQuery component with the necessary SQL command.
2. Use a filter on the table if it's a small table or a local table.
I've sent you an e-mail for more details.
[ DelphiLand: free Delphi source code, tips, tutorials ]