views:

42

answers:

0

Hey,

What's the best way to create an asp.net page with a data matrix. Imagine an excel sheet where the rows have a dynamic amount of cells, but the number of cells must be the same for each row. The default number would be for example 9.

The user should be able to edit, add or remove each row separately. Upon with the appropriate changes to the DB would be handled automatically.

Now, breaking it down it gets more complex. This is not just a gridview where each row represents one row from one table. Instead, the 9 cells would be composed of 3 sets of types, in order. So that for example the first 3 cells would be data from table X with type 1, the second 3 cells would be data from table X with type 2, then the next with type 3, etc. And for each set of rows, if ANY of the cells contain data, the other types (remember, 3 cells per type) must also have at least one cell containing data.

Kinda hard to describe.

How would I go about doing something like this?

I was thinking of doing a view with SQL Server 2008, which could then be edited normally through a gridview. I could check for the data integrity during saving a gridview row. But if I did that, I have no idea how to create a matrix as a view in SQL. The whole concept of a matrix like this is new to me, so any and all advice is appreciated.

Thank you.