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 » GridCtrl: Sorting and Converters
GridCtrl: Sorting and Converters [message #21748] Wed, 03 June 2009 16:19
jeremy_c is currently offline  jeremy_c
Messages: 175
Registered: August 2007
Location: Ohio, USA
Experienced Member
I have code that looks like:

hives.AddColumn(APIARY_ID, "Apiary")
    .Edit(apiaryEdit)
    .SetConvert(apiaryEdit);

// Later in code

void BeekPRO::LoadApiaries()
{
    apiaryEdit.Clear();	
    SQL & Select(ID.Of(APIARY), NAME.Of(APIARY))
        .From(APIARY)
        .OrderBy(NAME.Of(APIARY));

    while(SQL.Fetch())
        apiaryEdit.Add(SQL[0], SQL[1]);
}


apiaryEdit is a DropGrid. When I sort on the Apiary column in my grid, it seems to sort based on APIARY_ID, not the actual content of the Converter. How can I make it sort on the text displayed, not the id stored?

Jeremy
Previous Topic: Can gridctrl remember row column sizes & other questions
Next Topic: Gridctrl and colors
Goto Forum:
  


Current Time: Sat Apr 27 04:42:29 CEST 2024

Total time taken to generate the page: 0.02535 seconds