Posted 8 September 2017, 1:20 pm EST
I am trying to build a spread with data from 3 different datatables, only one table can be directly bound to a cellrange. The other 2 tables are reorganized in to new tables, one table is vertical with the original columns displayed in rows, and then bound to a cell range. My problem appears when updating the data in a cell in the spread, I want to get an event to fire when a cell in the reorganized table is changed to be able to edit the value in the table connected to the database, in a typed DataSet connected to the database.
I had an idea of adding a class to each cell in the reorganized table, containing a value, a row index and a column index (the indexes from the table in the typed DataSet). The idea was to edit the value member in this class every time a value is changed in the spread and then propagate this value to the original table in the typed DataSet and the class holds the row and column for the value.
I tried to do this in the ColumnChanged event on the reorganized table but couldn't get it to fire, even after calling the AcceptChanges method on the reorganized table.
What methods in the spread can fire the ColumnChanged event on the DataTable, i.e. how can I commit the datatable? Is it possible to use a custom CellType to add the indexes from the original table directly in the spread?
I need to keep track of these indexes because the spread should be sortable in several different ways, both by rows and columns, and I still need to know where in the original DataTable to change the values.
I hope someone can understand my discription and my thinking... ;o)