TreeGrid initial state show 1st level children

Hi,

Is there a way to automatically show all 1st level children when the TreeGrid is first drawn?

My users don’t want to have to click on a customer to see the jobs. They want the jobs shown automatically.

Thanks,
Mike

Hy Mike,
You could use an field openProperty, let’s call it “isOpen” set to “1” or “true” for the client record when you define your tree data(Source) and when you crerate the tree you could let him know that “isOpen” in our case is the openProperty.
here is an example of how an tree definition should be:

Tree.create({
  ID:"menuTree",
  modelType: "parent",
  rootValue: 0,
  nameProperty: "nume",
  idField: "id",
  parentIdField: "parentId",
  openProperty: "isOpen",
  data: menuData
 });

For more clear explanation you could serch reference docs for “openProperty”

My TreeGrid is bound to a DataSource, so the Tree is created automatically, from what I understand. Can I still set the openProperty somehow?

Thanks,
Mike

Hi msatkevich,
For a databound TreeGrid, a ResultTree is generated in response to a fetch. This is a subclass of the standard Tree class used by Client-only TreeGrids, and can be customized via the dataProperties attribute of your TreeGrid.

Thanks
Isomorphic Software