Hi,
I have a table panel where users can drop item from a palette.
This is the table definition.
var tableTemplate =
$$(go.Node, "Auto",
{
[...]
},
$$(go.Panel, "Vertical",
[...]
$$(go.Panel, "Auto",
$$(go.Shape, "Rectangle", // the border
{ fill: "transparent", stroke: "black" }),
$$(go.Panel, "Table",
{
name: "TABLE",
[...]
},
$$(go.Panel, "TableRow",
{
row: 0
},
$$(go.Panel, "Table",
{
name: "HEADERTABLE",
column: 0,
[...]
),
$$(go.Panel, "Table",
{
name: "CONTENTTABLE",
column: 1,
)
),// end table row
) // end Table Panel of items
) // end Vertical Panel
)
); // end Node
When user drops an item into 'CONTENTTABLE' I would like to add also a textblock in the same 'HEADERTABLE'. I tried to do this in the mouseDrop event of the 'CONTENTTABLE' and to search for the sibling table (HEADERTABLE) with an iterator of all diagram nodes, but obviously I don't know wich is the current table.
I also tried using a 'findObjectsAt' passing diagram.lastInput.documentPoint as first parameter but also in this case I cannot find the right table.
I could also try to udate model data but I don't know the current node key of the containing item.
Can you please suggest me the right way to do this?
Many thanks.
Andre