For help, 100,000 in urgent need! Online answers!

Source: Internet
Author: User
For help, 100,000 in urgent need! Online answers! Development and Application of VCL Components
Http://www.delphi2007.net/DelphiVCL/html/delphi_20061226132901108.html
Dbgrid1 has the following records:
Idgp10gp12gp45gp20rf20fr20ot20
091111
0911010110
090000

In dbgrid2, the sum of data in each column in dbgrid1 is required.
Idgp10gp12gp45gp20rf20fr20ot20
10 12 1 11 111
How can we get the sum of each column of dbgrid1?
Please advise!

You can use SQL to directly obtain the summary results of columns.
You can also traverse the connected data sets of dbgrid1 cyclically and accumulate

Is there no simple method? Best to giveCodeFor more information, see. Thank you!

1. Cyclic computing
2. dbgrid2 re-select sum (*)
3. When dbgrid1select is used, you can get one and
In addition, DBGrid has never been used. I use listview for display.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.