title
Products            Buy            Support Forum            Professional            About            Codec Central
 

Sorting Methods

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • daboo

    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
  • Spoon
    Administrator
    • Apr 2002
    • 44509

    #2
    Ta
    Spoon
    www.dbpoweramp.com

    Comment

    Working...

    ]]>