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 » DropGrid, DropTree dynamic update.
DropGrid, DropTree dynamic update. [message #31556] Mon, 14 March 2011 06:27 Go to next message
Lance is currently offline  Lance
Messages: 347
Registered: March 2007
Senior Member

Can DropGrid be configured to something like this effect:
1. There is an edit area, just like a regular edit, it display the Format'ted text as was before the edit start.

2. When user enters some text, it has some mechanism to allow Libary user's program to update/filter data to be displayed as candidates of choice accordingly, or at least it can hide currently populated rows that don't match user input.

3. Even better, the dropdown is polymorphic. When there are too many candiates, it may be easier to put in a TreeView, and when user input has filtered out but a limited number, a list may make more sense.

By the way, the DropGrid example included with U++ package is very impressive. I particularly like the capability to set display columns and value columns (you can choose to hide the actual value column, eg, ID make a lot of sense to database but means little to end user. Unfortunately it uses a button to trigger dropdown. A user should be able to click the little triangle to the right or use certain key combination to show the popdown list.

Please let me know the current implementation can be adapted to these behaviour without heavy coding.

Thanks,

Lance
Re: DropGrid, DropTree dynamic update. [message #31559 is a reply to message #31556] Mon, 14 March 2011 09:21 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 2987
Registered: August 2008
Veteran
I like it. Just 1 + 2 is enough for me Smile

Best regards
IƱaki
Re: DropGrid, DropTree dynamic update. [message #31926 is a reply to message #31559] Fri, 08 April 2011 03:05 Go to previous messageGo to next message
Lance is currently offline  Lance
Messages: 347
Registered: March 2007
Senior Member
I figured out that I could use DropGrid::SearchHideRows() and DropGrid::SetValueColumn(int col) to achieve something similar to what I requested above.

However, I cannot use Up arrow and Down arrow to navigate items and cannot use Enter to select a currently selected one. It would be desirable if I can do without using mouse.

Anybody has a clue which flag(s) I should enable or something like that?

Thanks,
Lance
Re: DropGrid, DropTree dynamic update. [message #31927 is a reply to message #31556] Fri, 08 April 2011 08:11 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1354
Registered: November 2005
Location: Poland
Senior Contributor

Lance wrote on Mon, 14 March 2011 01:27


Can DropGrid be configured to something like this effect:
1. There is an edit area, just like a regular edit, it display the Format'ted text as was before the edit start.
2. When user enters some text, it has some mechanism to allow Libary user's program to update/filter data to be displayed as candidates of choice accordingly, or at least it can hide currently populated rows that don't match user input.


This is not possible in current version. But you seem not to be first who would like to have possibility to edit text. I'll think about it.
Quote:


3. Even better, the dropdown is polymorphic. When there are too many candiates, it may be easier to put in a TreeView, and when user input has filtered out but a limited number, a list may make more sense.


GridCtrl which is used to display the drop list doesn't support tree view (this is something I also wanted to implement long time ago)
Quote:


By the way, the DropGrid example included with U++ package is very impressive. I particularly like the capability to set display columns and value columns (you can choose to hide the actual value column, eg, ID make a lot of sense to database but means little to end user.


I'm glad you like the DropGrid Smile
Quote:


Unfortunately it uses a button to trigger dropdown. A user should be able to click the little triangle to the right or use certain key combination to show the popdown list.


I don't understand. What's wrong with trigger button? I guess you miss automatic list showing when user starts typing?

I'm working right now on the second version of my application which uses DropGrid and GridCtrl a lot and maybe I will be able to implement some of your features (especially point 1)

Re: DropGrid, DropTree dynamic update. [message #31929 is a reply to message #31927] Fri, 08 April 2011 14:22 Go to previous messageGo to next message
Lance is currently offline  Lance
Messages: 347
Registered: March 2007
Senior Member
unodgs:

Thank you very much!

And here is another feature I need: a callback for WhenSelect


Senario:
I have a DropGrid where a user can select an item either by mouse or keyboard (currently, I cannot do it with keyboard only!). When A selection is made, my application needs to take action accordingly.

Let's say, the list are a bunch of URLs, and the action is to load the webpage. Now what callback should I hook to? WithDropChoice, which is similar but more basic to DropGrid, has a WhenSelect callback, this provides opportunity for proper library user intervention which I am missing from DropGrid.

Or should I take another route, or DropGrid is not designed to be used in this situation?


Thank you again. Indeed DropGrid is a very useful widget.
Re: DropGrid, DropTree dynamic update. [message #31930 is a reply to message #31929] Fri, 08 April 2011 15:03 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1354
Registered: November 2005
Location: Poland
Senior Contributor

Lance wrote on Fri, 08 April 2011 08:22

unodgs:
And here is another feature I need: a callback for WhenSelect


You should use WhenAction. It's fired when selection changes.
Re: DropGrid, DropTree dynamic update. [message #31931 is a reply to message #31930] Fri, 08 April 2011 15:28 Go to previous messageGo to next message
Lance is currently offline  Lance
Messages: 347
Registered: March 2007
Senior Member
Thanks. It worked!

Re: DropGrid, DropTree dynamic update. [message #31933 is a reply to message #31931] Fri, 08 April 2011 15:42 Go to previous messageGo to next message
Lance is currently offline  Lance
Messages: 347
Registered: March 2007
Senior Member
Now it's very close to what I desire from a DropGrid.

I also find I could navigate using arrow keys (I remember I couldn't last time I tried), but I still cannot make selection using Enter key; I have to click the intended item with mouse. It would be nice if I can choose to do it with keyboard only.

Is it possible with the current version of DG?

Thanks!
Lance
Re: DropGrid, DropTree dynamic update. [message #32956 is a reply to message #31933] Sat, 25 June 2011 04:10 Go to previous messageGo to next message
Lance is currently offline  Lance
Messages: 347
Registered: March 2007
Senior Member
Update:

The "problem" that you cannot select item and close the DropGrid with Enter key (have to use mouse-left-click at present) actually has to do with the Key virtual function of GridCtrl:

bool GridCtrl::Key(dword key, int)
{
	if(!IsReadOnly())
	switch(key)
	{
		case K_ENTER:
			ClearSelection();
			#ifdef LOG_CALLBACKS
			LGR(2, "WhenEnter()");
			WhenEnter();//<-****THIS LINE****
			#endif


Move the WhenEnter(); line out of #ifdef #endif block will fix the problem.
Re: DropGrid, DropTree dynamic update. [message #32962 is a reply to message #32956] Sun, 26 June 2011 11:21 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1354
Registered: November 2005
Location: Poland
Senior Contributor

Quote:

The "problem" that you cannot select item and close the DropGrid with Enter key (have to use mouse-left-click at present) actually has to do with the Key virtual function of GridCtrl

Thanks! This is obviously a bug. Now in svn.
Re: DropGrid, DropTree dynamic update. [message #32969 is a reply to message #32962] Sun, 26 June 2011 15:21 Go to previous messageGo to next message
Lance is currently offline  Lance
Messages: 347
Registered: March 2007
Senior Member
You are very welcome.

Any progress on Edit+PopupGrid combination? Smile
Re: DropGrid, DropTree dynamic update. [message #33244 is a reply to message #32969] Tue, 19 July 2011 22:54 Go to previous message
unodgs is currently offline  unodgs
Messages: 1354
Registered: November 2005
Location: Poland
Senior Contributor

Lance wrote on Sun, 26 June 2011 09:21


Any progress on Edit+PopupGrid combination? Smile

Unfortunately no.. But I have it on my todo list Smile
Previous Topic: GridCtrl paste and WhenAction
Next Topic: ArrayCtrl and FileSel.ExecuteOK
Goto Forum:
  


Current Time: Mon Sep 16 06:35:51 CEST 2019

Total time taken to generate the page: 0.01511 seconds