Status & Roadmap
Authors & License
Funding Ultimate++
Search on this site
Search in forums

SourceForge.net Logo
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » GridCtrl: Feature Requests
GridCtrl: Feature Requests [message #35878] Fri, 30 March 2012 14:10 Go to next message
Lance is currently offline  Lance
Messages: 352
Registered: March 2007
Senior Member
1. Custom filtering

Use case: In a grid, there is a column called 'age'; the grid has been populated. Then I want to show only rows with ages in certain range. Ideally, GridCtrl will provide a method Filter(); it takes a Gate that will allow user program to test if a row should be filtered out. It's very similar to what Search with search-hide-rows do, but allowing for callback.

Maybe this feature is already there, just I don't know how to use it.

2. Custom sorting

Clicking column header to sort is very handy. Unfortunately sometimes it doesn't demonstrate desirable behavior. E.g., the sorting issue I mentioned in an earlier post. And sometimes, a column might be combined from many pieces of data(because it's more screen space efficient to combine them together). In these cases, more flexible sorting is desirable. A Sort() that accepts callback will fix the issue.

3. External data
The only thing I missed from ArrayCtrl is the capability to use external data (SetVirtualCount, etc). There are times that I'd love to have GridCtrl to ask me:"I know you have a total of 100 rows, I am now drawing the 36th row, can you tell me the datum in the 1st column of the row so that I can render it for you? and the 2nd column..."

I think it might be reasonable to insert an intermediate class in the class hierarchy, maybe a GridCtrlBase which has virtal functuions like:
virtual void SetCount(int newcount)=0;
virtual int GetCount()=0;
virtual Value Get(int row, int col)=0;
virtual void Set(int row, int col, Value value)=0;

And GridCtrl, like what it is current doing, provides built-in storage and implements these functions accordingly.

[Updated on: Fri, 30 March 2012 14:19]

Report message to a moderator

Re: GridCtrl: Feature Requests [message #36349 is a reply to message #35878] Mon, 21 May 2012 16:33 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1356
Registered: November 2005
Location: Poland
Senior Contributor

Thank you for suggestions - I'll try to do something about it Smile.
Re: GridCtrl: Feature Requests [message #36473 is a reply to message #36349] Wed, 30 May 2012 23:59 Go to previous message
Lance is currently offline  Lance
Messages: 352
Registered: March 2007
Senior Member
Great! and thanks!
Previous Topic: GridCtrl and SplitterFrame
Next Topic: Problem with GridCtrl
Goto Forum:

Current Time: Sat May 30 21:02:59 CEST 2020

Total time taken to generate the page: 0.01964 seconds