Sort table / dbgrid by lookup field

hi all,

i am trying to sort a dbgrid according to a lookup field, the index method does not work because i can't create an index for a look field.
my finaly objective is to create a dbgrid that have sort by clicking on the title of each column, including lookup fields

TIA,
guy

Comments

  • : hi all,
    :
    : i am trying to sort a dbgrid according to a lookup field, the index method does not work because i can't create an index for a look field.
    : my finaly objective is to create a dbgrid that have sort by clicking on the title of each column, including lookup fields
    :
    : TIA,
    : guy
    :

    Hi, I've done something along those lines, but it was kinda fudged. I set the number of fixed rows in my dbgrid to 0, and then created a "fake" top fixed row, made up ACTUALLY of buttons. Upon clicking a button, the program would then string together a query with a different ORDER BY clause, and I would then requery and repopulate the dbgrid with the newly sorted data. I have just found out recently you can even keep your highlighted place in the grid (roughly) by keeping track of a toprow property.

    Hope that helps!
    Rusty
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion