UML Class Adding Rows

Hello, How can make a dynamic UML class in which i can add rows to add new attributes? thank you

I assume you are starting with the UML Class Diagram sample: http://gojs.net/latest/samples/umlClass.html

Note how the node data in the model have two data properties that are Arrays of Objects describing each “property” or “method” of the “class” that the node represents. The list of “properties” and the list of “methods” is each implemented by a Panel whose Panel.itemArray is data bound to the corresponding Array property of the data. Read more at http://gojs.net/latest/intro/itemArrays.html.

So you just need to implement a command that adds (or removes) an item from that array. Although that UML Class Diagram sample does not include adding or removing individual “properties” or “methods”, perhaps it should.

You could look at some other samples for examples of how to do that. Consider http://gojs.net/latest/samples/pageFlow.html and http://gojs.net/latest/samples/addRemoveColumns.html.

You could provide the functionality in various manners, including separate HTML buttons, buttons in the node template, or context menu commands.