I want to use DataTables to store multiple “layers” of data.
Some Procedure computes means, absolute values and percentages for me. Theese three layers have excactly identical ordered rows and columns, but the values change.
When I delete or insert a row, similar operations must be made to the other two tables as well. Has somebody a good Idea?
Further explanation:
Dim absTable as DataTable
Dim meanTable as DataTable
Dim percTable as DataTable
abstable.rows(2).delete
How can I guarantee, that this operation is executed on the other two tables as well?
You might want use a
DataSetinstead of multipleDataTable. Because, inDataSet, you can manipulate multipleDataTableusing the.Tables(Index|TableName)property witch assure you to do operations on the right table. You need an higher hierarchical object to do what you want.So if you want to delete a row in all tables, just loop on the desired tables and call the
deletemethod:You can also have cross Tables references to ensure or manipulate or do whatever you want on it.
Hope this is what you asked for.
see http://msdn.microsoft.com/en-us/library/system.data.dataset.aspx for more details on DatsSet.