I am working on an ASP.NET 1.1 project where the requirement is to create a matrix table where the number of rows and the number of columns are determined by two separate datasets and can vary. Once the matrix is created the page has several buttons that do postbacks that need the data and any modifications made to a cell in the matrix table to be retained.
The <asp:DataGrid />
is the obvious option but how do I add columns dynamically to the control?
I am also considering dynamically building <asp:table />
control on the fly but I am not really sure if this is the way to go.
A problem I have with datagrids is that they blindly bind to a dataset. The table I am creating has the first column as the sum and the second one as the weighted average of the subsequent column data. There is also a grouping of the columns.
In this scenario is it better to use a table server control and build the entire thing or do this in a datagrid ?