I have an application where I want to present data in rows, for editing, but I have a variable number of columns depending on the configuration for that installation. Here's a rough overview;
Line Item 1 | Area 1 | Area 2 | Area 3 | ... | Area N | Total All Areas Line Item 2 | Area 1 | Area 2 | Area 3 | ... | Area N | Total All Areas (only the area amounts would be editable) I previously had all Area columns defined in a single row, but in some installations I need more or less areas. I've modified the database so that it's properly normalized, so the end table is something like; LineItemID (fk) AreaID (fk) AreaAmount (my data value) I've experimented with building asp.net tables dynamically, but I'd like to be able to get some kind of row-oriented functionality so that I can use some type of datagrid. I've also experimented with defining a Line Item class, and dealing with the creation and editing in code, but the only way I could figure that out was to hard-code the specific number of areas in the class -- which means I need to modify the code in order to change the number of areas. Can anyone offer a suggestion on how to proceed? All comments gratefully appreciated.
