Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Custom Tree control Collapse All
Subject Author Date
Massimo Germi Sep 6, 2006 - 9:11 AM

I have to implement a custom control based on CExtTreeGridWnd.
Child items need to be a "virtual item" that not inherit column formatting and can display other controls derived from CWnd.

Like this:

ROOT ITEM
|
|---ITEM01
| |---___________________________________________________________
| | |
| | custom child item that display another control derived from CWnd |
| | |
| |___________________________________________________________|
| ---ITEM02
| ---ITEM03
| ---ITEM04

Do you have some suggestions to fo this with your library?

Thanks for any help?

Massimo Germi Sep 6, 2006 - 9:14 AM

The samples is not formatted correctly; try again

ROOT ITEM
|
|---ITEM01
| |---___________________________________________________________________
| | |
| | custom child item that display another control derived from CWnd |
| | |
| |__________________________________________________________________|
| ---ITEM02
| ---ITEM03
| ---ITEM04

Technical Support Sep 6, 2006 - 12:52 PM

Any grid that comes with Prof-UIS is not designed so to support CWnd controls in its cells except for temporarily in-place activated windows. One of the reasons is performance issues. For example, if a column looks as though it contains combo boxes in fact only when the end user uses it, the associated HWND in-place editor is created on the fly. Besides if you had a grid with 100-200 window handles, what it would be like? Please let us know more about why this requirement is so important for you.

Massimo Germi Sep 6, 2006 - 1:20 PM

First of all tanks for fast answer.

Usually I use listCtrl for display data from a database, I wish to use TreeGridCtrl custom control in the following method:
- First level of items are the result of a query from a DB and rapresent summary data;
- Second level of items are relative to parent item and can display detail of this. In this case the second level is a new TreeGridCtrl that can be created only when the user expand the node.

ex:
The first level has 2 column, Client Name and total $ per month.
The secon level has 4 column, Date, Spare part Name, N° of Items, Cost.
______________________________________________________
|- Client 01 | 2,000.00$ |
|- 2006/01/05 |Part 01 | 45 | 502.00$ |
|- 2006/02/06 |Part 10 | 10 | 98.00$ |
|-Client 02 | 500.00$ |
|- 2006/01/10 | Part 515 | 1250 | 12,550.00$ |

This is only a simple examples.
Thanks o lot

Technical Support Sep 7, 2006 - 11:49 AM

We can offer you at least two options. You could use the auto-preview area of the report grid for displaying the content of child rows. Each row in the report grid has an associated cell which occupies the whole row and is located under the row. This is the preview area (you can see this in the ReportGrid sample).

If per-row detailed information is large, you could use the simple plain grid and create a property grid control for displaying the content of child rows for the focused row in the main grid.

Massimo Germi Sep 7, 2006 - 1:19 PM

Tx again, I will try to use auto-preview area.