Solved

delphi 4

Posted on 2013-06-26
3
231 Views
Last Modified: 2013-08-15
in a drawgrid say grid1, i have 20 rows, 5 rows are related to item1, next 5 are related to item2, like wise last 5 rows related to item4.

now on a button click, i need to show in another tdrawgrid say grid2, only 5 rows :
all rows related to item 1 shall be shown in a single row, eg row 1
all rows related to item2 shall be shown in a singel row eg row2
like wise all row related to item 4 shall be show in single row eg row4

1 option in my mind is:
putting all rows related to item 1 in a stringlist lets say stringlist1
putting all rows related to item 2 in a stringlist lets say stringlist2
.........................................................like wise..............................
putting all row related to item 4 in a stinglist lets say stringlist4
show them in grid2.

?to implement?
0
Comment
Question by:AbhiJeet
3 Comments
 
LVL 32

Assisted Solution

by:ewangoya
ewangoya earned 167 total points
ID: 39279307
Use two TClientDatasets
Create a master child relationship

When you click on master or move to master record via code, child records are automatically filtered. You can then draw whatever is on the child dataset on your grid.
0
 
LVL 25

Assisted Solution

by:Sinisa Vuk
Sinisa Vuk earned 167 total points
ID: 39284563
TVirtualTreeView have a great possibilities.
http://www.soft-gems.net/index.php/controls/virtual-treeview
0
 
LVL 36

Accepted Solution

by:
Geert Gruwez earned 166 total points
ID: 39289129
devexpress can nest grids
tms also has very good options
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

757 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now