Solved

display rolling 12 month data in gridview

Posted on 2010-08-16
3
380 Views
Last Modified: 2012-08-13
I am trying to replace an Excel spreadsheet and need to display rolling 12 month data with a gridview.  Here is some sample data.

tblProject                        
fldProjID,fldRegistration,fldStartDate,fldEndDate,fldHours
1,111ABC,25/07/2010,02/08/2010,16000
2,222ABC,09/08/2010,10/09/2010,24000
3,333ABC,02/09/2010,20/09/2010,24000
4,444ABC,20/10/2010,05/11/2010,32000

tblHours                        
fldHoursID,fldProjID,fldDate,fldHours      
1,1,01/07/2010,12000      
2,1,01/08/2010,4000      
3,2,01/08/2010,15750      
4,2,01/09/2010,8250      
5,3,01/09/2010,24000      
6,4,01/10/2010,22000      
7,4,01/11/2010,10000

I have attached a screenshot of how I would like the gridview to appear.  I have given two views and you can see how the months have rolled.

How do I get a gridview to show data in this manner?
screenshot.png
0
Comment
Question by:iepaul
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
robasta earned 500 total points
Comment Utility
you can use datatables. Load your data (from the 2 database tables) into 2 datatables. Process each of the Registrations (tblProject records) to generate a 3rd datatable which you will then display to the user.
0
 

Author Comment

by:iepaul
Comment Utility
Will I be able to edit the data when displayed like this?
0
 
LVL 14

Expert Comment

by:robasta
Comment Utility
Yes. With this approach, you would need to manually handle edits. I.E. when there is an edit, process it to map the data to the correct table.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This video discusses moving either the default database or any database to a new volume.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now