-
sorting
I have put a dbgrid control on my form and assigned its datasource with the help of a data control. I have
sorted my table in the backend(access).But the values when assigned to the col in the grid do not appear
in a sorted order. Is there any way to overcome this problem?
Any help on the topic would be appreciated.
-
Re: sorting
If RecordSource property of DC is a table name then replace it with Select statement containing ORDER BY. Example for Nwind db Customers table:
SELECT * FROM Customers ORDER BY City.
If you already have select statement in RecordSource, just add ORDER BY clause.
Vlad
-
Re: sorting
Hi !
As your back end is Access, develop a query suitable to your requirements. Create a db control on your form and in the
Record Source property you have to give the name of the query, instead of table. Then all fields in the sorted order ( as
you desire) could be seen.This I checked practically and it is working well.
Satya
Email: [email protected]