Hi,
-1-
Is it possible to delete a cell from a TableNode? I can DeleteRow or Delete Col, but not a specific cell...
-2-
Instead, I could do a manual deletion by setting the cell's text to string.empty and removing anchors. That's fine. However, I don't know how to delete the links that are already attached to the anchors.
foreach (DiagramLink link in tableNode.GetAllLinks())
{
int linkAnchorPt = null;
if (column == IN_COLUMN)
{
linkAnchorPt = link.OriginAnchor;
}
else if (column == OUT_COLUMN)
linkAnchorPt = link.DestinationAnchor;
if (linkAnchorPt == myAnchorPoint))
{
this.diagram.Items.Remove(link);
}
}
The problem with this code is that OriginAnchor & DestinationAnchor are int and that myAnchorPoint is an AnchorPoint. How can I get the related AnchorPoint / index so I can do the comparison to the delete the good links?
-3-
If I take solution #2, is there a way to shift cells up below the delete one so that there is no empty space left?
Thank you,
Marie
p.s. If this is not clear, I have a table that has the following cells:
input1 output1
input2 output2
input3 output3
input4
If I delete input4, it's easy to call DeleteRow since there is nothing on the same row. However, I want to delete input2 so that my table becomes:
input1 output1
input3 output2
input4 output3
(and of course delete related links & patterns)