Recent

Author Topic: Kgrid (databound) question on sort arrows  (Read 3916 times)

snorkel

  • Hero Member
  • *****
  • Posts: 817
Kgrid (databound) question on sort arrows
« on: September 29, 2012, 07:42:26 am »
Hi,
I anyone using tkdbgrid?  It looks really good, but I can't seem to figure out how to get the column sort arrows to show when I click on the column headers.
I have the foCoSorting set to true but no arrows and the OnCustomSortCols never fires.

The row sorting arrows show up, but not the header ones.

Any ideas?  I am probably missing some setting combination, but it does not mention anything about the tkdbgrid in the help PDF.

Thanks,

Snorkel
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Kgrid (databound) question on sort arrows
« Reply #1 on: September 29, 2012, 08:57:30 am »
you need to have RowSorting enabled and you have to select how the sorting will work eg updownnone
after that you write a customsort routine and when ever the user clicks on a column header you sort and set sorted := true or false before exiting.

Mind you that I have no previous experience with kgrid and from the few things I encountered today I don't know if I want to know more.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Kgrid (databound) question on sort arrows
« Reply #2 on: September 29, 2012, 09:06:37 am »
Tried all that,  and still can't get the header sort arrows to work, 
When I click on the far left fixed row it shows the row sort arrows and
Fires the column custom sort. Seems to be a mess.
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Kgrid (databound) question on sort arrows
« Reply #3 on: October 01, 2012, 03:03:39 am »
ok, got the arrows showing I reset the options again and it worked this time, not sure if I simply did not have them both
active at the same time....oh well.

Now it seems the editing does not work, when I edit a text field the post and cancel icons don't enable in the db navigator.

***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

 

TinyPortal © 2005-2018