Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Custom rendering of TreeNode items

    Hey,

    I am using a tree to display a complex attribute type hierarchy. One of the attribute types is actually a 'Reference' - it can reference another attribute type, or a different tree node. I want to display this like:
    Code:
    -ID0: All attribute types
        +ID1: Some attribute
        +ID2: Attribute reference -> [ID1]
    I'd like to display [ID1] as a link, that, when clicked, would focus on the ID1 node. I know I can create a custom node doubleclick handler, but this event actually opens the attribute editing dialog, and I'd like to keep it.

    I tried going down the path outlined in http://www.smartclient.com/smartgwt/showcase/#featured_grid_cell_widgets, but the TreeGrid doesn't have the

    Code:
    protected Canvas createRecordComponent(final ListGridRecord record, Integer colNum)
    override point.

    Any hints and suggestions are very much appreciated.

    regards,
    Andrius J.

    #2
    Actually, disregard this. I missed couple of method calls on a new grid:

    Code:
                        newGrid.setShowRecordComponents(true);
                        newGrid.setShowRecordComponentsByCell(true);

    Comment

    Working...
    X