In my opinion, the simplest and at the same time, the most functional will be the combination of DataTable with DataGridView.
Immediately I see a potential problem in that the DataGridView will not automatically add / delete columns at the matrix when the data changes, it will be necessary to implement it manually.
Nothing like this, with this code:
DataTable matrix = new DataTable("Матрица"); ... //загоняем матрицу в matrix ... dataGridView.DataSource = matrix; /* этой строчкой теперь все изменения dataGridView будут отражаться в matrix */
And if we add to the form, for example, TextBox and Button to add a new column, the implementation of pressing the button will be as follows:
matrix.Columns.Add(textBox.Text, typeof(int)); dataGridView.Update();
And the new column will be added to the matrix. Moreover, by virtue of your statement about the functionality, you can save this matrix to a file in one line:
matrix.WriteXml("Matrix.xml", XmlWriteMode.WriteSchema);
And also one line to load if necessary ...