Solved

display rolling 12 month data in gridview

Posted on 2010-08-16
3
381 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
ID: 33444741
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
ID: 33444777
Will I be able to edit the data when displayed like this?
0
 
LVL 14

Expert Comment

by:robasta
ID: 33444881
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Tool Box 2 34
Run time Error 4 34
VB.NET return row from SQL to DataSet and get column values ? 3 24
VB.NET Repostiory Pattern 7 0
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…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

930 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

11 Experts available now in Live!

Get 1:1 Help Now