Print Page | Close Window

Interesting UI problem!

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: General Discussion
Forum Description: Topics Related to Visual C++ MFC Development in General
URL: http://forum.codejock.com/forum_posts.asp?TID=16710
Printed Date: 28 April 2024 at 11:38pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Interesting UI problem!
Posted By: znakeeye
Subject: Interesting UI problem!
Date 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/



Replies:
Posted By: ReyesRP
Date 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...



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net