Hello everyone,
I am developing an
ASP.NET application with Angular frontend. Currently my backend server pulls data from another API and saves data to local database in the following format:
| Student Name | Results | Test # |
| Student 1 | Pass | 1 |
| Student 2 | Pass | 1 |
| Student 3 | Pass | 1 |
| Student 4 | Pass | 1 |
| Student 1 | Fail | 2 |
| Student 2 | Pass | 2 |
| Student 3 | Pass | 2 |
| Student 4 | | 2 |
| Student 1 | Pass | 3 |
| Student 2 | Pass | 3 |
| ... | ... | ... |
And it keeps append new rows to the table as there are new test results published.
However, in my SPA I would like to display the data as follow. Note that the N is dynamic and unknown. It could be like 10 new sets of test results a day.
| Student Name | Test 1 | Test 2 | Test 3 | Test N |
| Student 1 | Pass | Fail | Pass | ... |
| Student 2 | Pass | Pass | Pass | |
| Student 3 | Pass | Pass | | |
| Student 4 | Pass | | | |
Do you suggest using Angular Material Data Table for it? If so what is the best way to handle the dynamic nature of column size and names? I could make my API takes parameterized column size such as ?length=100 and only outputs the latest 100 sets of results. But the names are still dynamically changing/incrementing.
Thanks