Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Showing information from classes in grids

Status
Not open for further replies.

StevenK

Programmer
Jan 5, 2001
1,294
GB
I come from a Delphi 5 database development team and am looking at using C++ Builder to achieve similar results in my application. I am looking to replace the use of datasets with collections/lists of classes. For instance a dataset containing details of Suppliers may be replaced with the use of a collection of the Supplier class (each containing the Supplier ID, name and other info.). Having loaded the classes from the database am I able to display the information as stored in these classes in the form of a grid (like I would do with a TDBGrid against the dataset). Would I also be able to order these entries by appropriate properties - i.e. Supplier ID or Supplier Name ?
Any pointers or simplistic code examples would be appreciated.
Thanks in advance.
Steve
 
You should be able to do it without a "lot of pain" ;-) since most of the components of Builder are written in Delphi. The TDBGrid should work the same. The main diifference will be any manual coding you do, of course, since instead of Pascal, you will have to use C++.

If you have a copy of C++ Builder (BCB), there are some examples of using data bases on the CD.

James P. Cottingham
 
Thanks for the info, but my intention is to remove the use of database components and work with classes loaded with the same information that would be seen in the database components. Can I show class information in grids (StringGrids maybe ?) ?
Thanks again
Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top