Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Two "basic" operations on GridCtrl
Re: Two "basic" operations on GridCtrl [message #21082 is a reply to message #21027] Sat, 02 May 2009 12:14 Go to previous messageGo to previous message
kbyte is currently offline  kbyte
Messages: 87
Registered: July 2008
Member
Hi,

I a trying another feature of the dbgridCtrl but without success

In the dbgrid control I have columns with text, others with numbers other with dates. I need that sorting capability respect the type of the data that the sorted column has.
To the best of my knowledge, dbgrid sorts columns using text data type. What about if we want to cutomize the sorting?

I am trying that with


dbGridCtrl.WhenSort= THISBACK(OnCustomSort);

But, when OnCustomSort is called how do we know which column was click to be sorted?
How to implement custom sort inside OnCustomSort? A simple example would be very appreciated.

One more question please:

Can we "turn off" a callback during runtime?
Like this:

For some moments i need that dbgrid implement custom sorting so i do this:
dbGridCtrl.WhenSort= THISBACK(OnCustomSort);

But when i want to return to the default sorting of the dbgrid, how to turn off this callback?
I tryed to set NULL in WhenSort but compiler complains Sad

Thanks a lot






Kim

[Updated on: Sat, 02 May 2009 12:16]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ArrayCtrl.AsQtf bug?
Next Topic: LineEdit font bug
Goto Forum:
  


Current Time: Wed May 01 04:44:12 CEST 2024

Total time taken to generate the page: 0.01912 seconds