Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Delphi 4 and sorting DBGrid data

Posted on 1999-09-29
Medium Priority
Last Modified: 2010-05-18
I am using Delphi 4.
I would like the user to have the ability to click on the title of a column and have the data sort in ascending or descending order.

Is this something that is easy to do?
How do I go about doing that?

Question by:patricks
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 2083723
You will probably need a custom grid to do that..otherwise you may have to write your own event handler (when the use clicks on the headers) that would send a parameter to an SQL query.
LVL 27

Expert Comment

ID: 2083761
or you must have an index for each field and each sortorder and chages the index of your dataset :-)
LVL 12

Accepted Solution

rwilson032697 earned 100 total points
ID: 2083764
Use DBAdvStringGrid downloadable from here ( It's free for personal use, for business use its $50 - and you get the source - I reccommend it having used AdvStringGrid from the same people in our own products.



Expert Comment

ID: 2083873

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA:…
Suggested Courses

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question