1 person found this helpful
Just have one DataGrid, and change the data it displays based on the nav buttons.
You could have separate dataProvider ArrayCollection or XMLListCollection objects for each set of data.
If this post answers your question or helps, please mark it as such.
One quick clarification quesiton, which event should be responsible for re-calculating the variable numbers in the arraycollection? the itemClick property of the mxml for the datagrid? or would best practice be to handle that functionality elsewhere in the module/application? I'm a bit new to MVC/ loose coupling techniques, so where to put what functionality is often a bit difficult for me to visualize.
Can you clarify on what the calculations are for?
You could store calculations for the currently displayed data in another ArrayCollection.
You could update the calculations from the "show" event, or perhaps the "dataChange" event of the DataGrid.
each table can basically be seen as four columns- the first is a checkbox to include or ignore that section of the model. the second and third columns represent numeric input, either integers or decimals, always positive. The final column is a non-editable basic calcualtion of the second and third columns, assuming they aren't zero or inactive (i.e. a*b*12 or something simple like that).
The issue is that not all of the tables have the same number of inputs, and the formula for that final calculated value is different for each table- might be multiplied by a different number, or the relation between the inputs are different, etc. Also, there is a seperate state with a table that is like a cash flow analysis, which is dependant on all of the calculated values, and possibly a third state which contains graphs and other data-visualization components.
My initial layout was a 3 state application, with the first state having a viewstack and 12 layers, each with their own datagrid, the second being the cashflow table and the third being the graphs and such. However, it appears that's way too many unnecessary components in the viewstack, so I'm looking at replacing that viewstack with a datagrid that redraws itself based on the sub-navigation buttons. Does this sound about right?
I think having one DataGrid whose data changes depending on the nav buttons is fine.
I guess I'm not getting the relationship with the other areas of your app, so I can answer your other question(s).