Question: Edit Array/Matrix directly via DataTable / Change Size with ComboBox

Hello Everyone,

I am fairly new with Maple, but I am slowly getting the hang of it.

For a university project I need to be able to create a form where a user can input a matrix manually.
Also, I need to have something like a ComboBox where I can input how many rows that matrix will need. (1-20 or so)

I have solved the latter part by adding a "When Use"-Code that sets my Array/Matrix of the DataTable to be a Zero Matrix with the correct dimensions in accordance with the value chosen in the ComboBox.
(This is for a composite calculation, the ComboBox gives the number of plies, the matrix defines the ply orientation)

I then expected that the ZeroMatrix would serve as the baseline and the user can then manually edit the Matrix to be the correct values manually, but this gives me the error message that the DataTable cannot be edited.
I suspect the ZeroMatrix is now the "Master", because I defined it via Code.

Working with "visibleRows" did not help, because it does not change the matrix size only the size of DataTable and the user can still scroll down.

What I need is that I have a fully editable DataTable with exactly the number of rows that I specified using the ComboBox.

Does anyone of you perhaps have an idea what I could do to achieve this?
Any help would be fantastic! :)

Best Regards,
Lennart

Please Wait...