Quantcast
Channel: XPages – Xcellerant
Viewing all articles
Browse latest Browse all 216

Categorized Dojo TreeGrid in XPages – Additional Features

$
0
0

In the last post I showed how to create a categorized Dojo TreeGrid. In this post, we’ll take a look at a few extra features available to the grid.

The code from the last post serves as the baseline and this post will highlight any changes that are required.

defaultOpen

The defaultOpen property can be added to define whether the grid should be expanded when rendered.

var grid = new dojox.grid.TreeGrid({
  treeModel: treeModel,
  structure: layout,
  defaultOpen: true
}, 'treeGrid');

TreeGrid_2_a_DefaultOpen

expandoCell

The expandoCell property defines which cell should include the expand/collapse icon. It’s a 0-based index, so to put the icon in the second column, give it a value of 1.

var grid = new dojox.grid.TreeGrid({
  treeModel: treeModel,
  structure: layout,
  expandoCell: 1
}, 'treeGrid');

TreeGrid_2_b_ExpandoCell

Up Next

In the next post, I’ll show how to add counts and totals to the TreeGrid.



Viewing all articles
Browse latest Browse all 216

Trending Articles