Viewing records per month (asp.net, C#)

Soldato
Joined
29 Oct 2004
Posts
10,884
I'm working on a sales system at the moment and I've come up against a bit of problem.

Basically, situation is I have 2 database tables, Customer and Payment, with a relationship so that each customer has many payments.

The payments are dated, and I need to display these payments in a table so that each row is a customer and then after the customer details each column represents one month. Within each cell for every month/person I need to display the payments made in that month for that particular person; some months there might be 1 payment, others there may be 4-5 as customers can pay by either month or week, some changing part way through the payment plan.

Issue I have is displaying this data in the format required. At the moment I'm using GridView and DetailsView controls where appropriate throughout the system but neither are particularly suitable for this as they come; a GridView would be ideal, but I'm not sure how to handle the monthly columns as there needs to be several years worth of them, ideally dynamically expandable as time progresses.

Two ways I've thought of doing it so far are:

Repeater. A lot of coding but I think I can end up with what's required.

Customised GridView. TemplateFields for each month, dynamically generated if possible.


I'm not asking anyone to code this for me (though it would be nice :D), but does anyone have any ideas or pointers for me to sort this one out?

Cheers :)
 
Back
Top Bottom