title
Products            Buy            Support Forum            Professional            About            Codec Central
 
Results 1 to 2 of 2

Thread: Sorting Methods

  1. #1
    daboo

    Cool Sorting Methods

    Hello Spoon,

    It looks as though you are using MS Visual C++ to code dBPowerAMP, Here is a snippet of code for a simple sort method (I wrote this in Borland C++ Builder). What I did was set up a bunch of secondary indexes when I created the database, and then just referenced them. Works well associating with the OnTitleClick Event.

    void __fastcall TMainForm::Button2Click(TObject *Sender)
    {
    // Sort By
    if (SortBy->Text=="Status")
    {
    Report->Table1->IndexName="status-1";
    Report->SortBy->Text="Sort By: Status";
    }
    if (SortBy->Text=="Section")
    {
    Report->Table1->IndexName="sec-row-lot-grv";
    Report->SortBy->Text="Sort By: Section";
    }
    if (SortBy->Text=="Site *")
    {
    Report->Table1->IndexName="grvno-c";
    Report->SortBy->Text="Sort By: Site *";
    }
    // End Sort By

    You may also like to take a look at:
    http://www.quasidata.com, they have a nice grid component that allows for maximum re-arranging flexibility.

    Hope this helps.

    Later,
    Daboo

  2. #2
    Administrator
    Join Date
    Apr 2002
    Posts
    43,855
    Ta

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •