The table columnCount

What I just described shows how the number of columns will always correspond with the highest numbered column for which a getColumnDefinition was called. It is now new behavior that if you call removeColumnDefinition on the last (i.e. highest numbered) column, then the columnCount will decrease.

Since there is no way to bind the Array of RowColumnDefinitions, since that property doesn’t exist on the Panel class, you have to have some code that does the update.

But in any case it appears that the semantics of the Panel.columnCount property do not match what you were looking for. So, don’t use it for whatever purposes you have.

I understand what you said, but to call removeColumnDefinition is not i want to call it, it just no way to delete the column correctly.

And how about applyIncrementalJson the table did not delete column?

in applyIncrementalJson ,the other diagram maybe in other side of internet, and right now i have no idea how to fix it.

OK, don’t use removeColumnDefinition.

The reason applyIncrementalJson doesn’t “work” is for the same reason – the state of the columns is not bindable/settable. You’ll need to modify them programmatically.

OK, any idea on when applyIncrementalJson or after, apply json to diagram? right now I don’t know how todo.

In main site, that editing diagram, maybe we do some workaround to solve the problem but in other watching site, how to apply, ignore 0 width column?

Or there is have a way to refresh the node ? or reload the node data? not whole diagram json, that will be slow.

Or is there another way to write my own table panel? :)
If there has a extension that is a Custom Table Panel also OK :)

Yes, I would update the affected “Table” Panels in updated nodes just after the call to applyIncrementalJson.

I don’t see why it matters whether it’s the original diagram or at at later time or a different diagram.

Yes, you can define your own PanelLayout class, PanelLayout GoJS Sample

But PanelLayoutTable really isn’t designed to be subclassed because it doesn’t expose interesting methods to be overridden.

You mean you will update the affected “Table” Panels in future? or gojs already did but don’t know why deleted column not disappear?

Table panel is not simple Layout right? please, please fix the problem , at least applyIncrementalJson thank you.

I was suggesting what I would do if I were you. We’re not going to change the implementation of “Table” Panels except to fix bugs, of which I know none at this time.

wait I will think about this.

But how Update the “Table” Panels

applyIncrementalJson on table not correctly update the incrementalJson is not a bug? it normal?

If we feel those problem is not a bug, we should delete the addRemoveColumns Add or Remove Columns
from web site, I think it misleading people code wrong.

so please please please, fix it please.

Have you tried what I suggested? That’s just after the call to applyIncrementalJson.

I don’t know how to do, In this sample I already call myDiagram2.model.applyIncrementalJson(json);

For each modified node data, find the corresponding existing Node and its “Table” Panel, and then iterate through the new “columnDefinitions” Array and make sure its information is properly reflected in the panel’s actual column definitions.

That includes calling Panel.removeColumnDefinition on any columns that are not represented in the new “columnDefinitions” Array. For example, when column 3 has been removed. It is this step that your code is missing.

Remember that this extra work is required because there is no way to set or bind the internal Array of column definitions combined with that Array allowing null/undefined entries.

you mentioned above, now we should use it?