Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > General Discussion
  New Posts New Posts RSS Feed - Interesting UI problem!
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Interesting UI problem!

 Post Reply Post Reply
Author
Message
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Topic: Interesting UI problem!
    Posted: 15 May 2010 at 1:42pm
Consider this application. You have a report control with a number of (groupable) fields. The data is fetched from a database.
 
Now, when the user clicks Column A, he expects the fetched data to be sorted by A. That's easy. You simply perform an "ORDER BY" at the selected column. However, sometimes you really want to sort the data presented in the GUI. Hence, it makes sense to sort the visible rows - by clicking the column header. That becomes a problem!
 
How do you combine the best of two worlds? How do you allow the user to sort both the fetched data and the data visible in the GUI? And more importantly, how do you accomplish this with the CJ report control?
 
I'm thinking of sorting the database data when certain columns are clicked. E.g. "Date". However, that yields unintuitive UI
 
Any ideas?
PokerMemento - http://www.pokermemento.com/
Back to Top
ReyesRP View Drop Down
Groupie
Groupie


Joined: 30 January 2008
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote ReyesRP Quote  Post ReplyReply Direct Link To This Post Posted: 02 June 2010 at 3:20pm
ReportControl will sort for you but you can also control the sort programmatically. So, I would say load the RC in your DBMS order, set the sort column when a column header is clicked but add a third setting to clear the sort column which will restore the sort order (basically record load order) that the RC was loaded with. So it would be something like click on the column header once for ascending, again for descending, and again for none. I don't use the column header as my sort UI but it seems like that would work...
 
Maybe you are talking about something more complex like also having a "reload the RC" UI that clears the RC sort column and reloads the RC with the records in a different order so that the default order is different...
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.