BadBart
asked on
Sorting within a database grid
I want to be able to have the data listed in a dbGrid be sorted by one (or two) of the fields. The dbGrid's datasource comes from a table which has a master datasource.
I tried specifying the field name I wanted to sort by in the "IndexFieldNames" property, but had a "Index out of range" error.
I tried specifying the field name I wanted to sort by in the "IndexFieldNames" property, but had a "Index out of range" error.
Did you try SQL?
ASKER
The supervisor of the project does not regard SQL very highly as it takes a much longer time to process.
So, I'm only to use things such as Findkey() and FieldByName().
So, I'm only to use things such as Findkey() and FieldByName().
Could you be more specific in telling us what type of database table you have (dbf or paradox) and what are the indexes you have created for the table. This would be more useful in getting a proper solution for your needs.
I know this is a stupid question, but i'm going to ask it anyway :
When using IndexFieldNames you have to define as index field names in your table structure. Have you done this. Primary and secondary indexes???
Have fun,
c.u. ZifNab;
When using IndexFieldNames you have to define as index field names in your table structure. Have you done this. Primary and secondary indexes???
Have fun,
c.u. ZifNab;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry for the delay! Thanks heaps..!