View previous topic :: View next topic |
Author |
Message |
rp Guest
|
Posted: Wed Nov 16, 2005 10:23 pm Post subject: is this type of tree possible |
|
|
Is this type of tree possible?
Code: |
root
|
|-data,data,data,data,data
| |
| |-message
| |-message
| |-message
|
|-data,data,data,data,data
| |
| |-message
| |-message
|
|-data,data,data,data,data
|
|-message
|
Basically I want to display a list of processes, and when I expand a process, show a list of log messages associated with that process. Is this type of structure possible with Virtual Tree? |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Fri Nov 18, 2005 1:37 am Post subject: |
|
|
Yes you can implement this using Virtual Tree. I assume that where you have the comma separated data value you want to put these in separate columns? _________________ Infralution Support |
|
Back to top |
|
|
rp Guest
|
Posted: Fri Nov 18, 2005 5:09 pm Post subject: |
|
|
Here's how I have it now:
and here's how I'd like to have it:
Can you point me in the right direction? I think what I'm trying to ask is how do I have a different number of columns in each row? |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Fri Nov 18, 2005 9:57 pm Post subject: |
|
|
Thanks for the illustration that makes it a bit clearer what you want.
The normal approach to this would be to make the first column a general column that every item supplies data for (ie there is a cell binding for this column for each row binding). You could then also consider using ContextSensitive columns to display data relevant to the currently selected item. The DataSet Browser sample takes this approach.
An alternative but more complex approach that would let you span the data from log messages across multiple columns would be to implement your own RowWidget class and override the OnPaint method to draw the string (after calling base.OnPaint). See the section in the online help on "Using Widgets". To use your derived class you would override the CreateRowWidget method and select the type of row widget to create based on the type of data being displayed. _________________ Infralution Support |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Mon Nov 20, 2006 5:08 am Post subject: |
|
|
Version 3.2 of Virtual Tree now supports SpanningRowWidgets. These allow you to have a row that spans across all columns. RowBindings now have a SpanningRow property that you can set to true to use the SpanningRowWidget instead of the standard RowWidget. _________________ Infralution Support |
|
Back to top |
|
|
|