Skip to Content
Dec 09, 2009 at 02:10 PM

Creating Nodes and Binding them at runtime


I have a requirement to create a dynamic table. The overall layout would be something like:

Sequence    Department    Plant 1     Plant 2    Plant 3    Plant 4
10          Sales         Tom         Jeff       Fred       Barney
20          Marketing     Tom         Dave       Alex       Barney


The issue is this, the number and names of the "Plants" aren't know until runtime. In addition each name I show in the example above would actually be a dropdown list of available names for the given plant/department. So Plant 1 / Sales would have a different drop down list then Plant 1 / Marketing, etc. Each dropdown listed under each plant would be unique to that plant AND department. In theory there could be 50 drop downs, all of them with a completely unique list of people to choose from.

I have a context node named "Approvers" that currently has only Sequence and Department as attributes. I figured I was going to have to create a non-singleton child node for each "Plant" under that node, create the table column (assigning the name of the plant to the column header) with a drop down by index as the cell editor and bind it to this new non-singleton node.

1. Does this sound like the proper method to acheive this goal?

2. If so I need help creating these dynamic nodes. I have created dynamic attributes for a node before, but never have I had to create nodes, and non-singletons at that.

Any help would be greatly appreciated. My head is spinning 😊