Hi Sir,
I have doubt can you please help me..I am very new in s/w Development.
below i am describing.
Original Table Structure.
ID Date TimeLogged UserName
1 10/8/2012 5.50 Bubai
2 11/8/2012 2.30 Bubai
3 10/8/2012 3.30 Bhanu
4 11/8/2012 7.30 Bhanu
I want result like below. User Name should be dynamic. May be lot of
users. User name will come from Database table. Please give me broad
description as I am very new in the system, for my understanding.
Date Bubai Bhanu Total
10/8/2012 5.30 3 8. 30
11/8/2012 2.30 7.30 10
Total 8 10.30 18.30
Please help me to solve this issue… It's really urgent
if you can reply early I'll really appreciate. Thanks in advance.
Thanks and Regards
Bubai Banerjee
Bubai BanerjeePosted Aug 22, 2012, 3:33 PM
Hi Sir,
Lot of Thanks for your kind help.
i know that how to bind the Gridview fom datasource.But my question is how shall i bind the Gridview with selected columns.As i have a lot of columns in gridview( i only show the selected columns to the users)as per my requirment.
as store procedure shows the pivot result.so my question is that how i bind username columns with bound or Template columns in Gridview(Asp.net).
so i am requesting you please help me for the same.
Thanks and Regards
Bubai Banerjee
Akkiraju IvaturiPosted Aug 20, 2012, 11:56 AM
Basically, you need to follow these 3 steps:
1. Create a stored procedure.
2. Create a web application or web site.
3. Create a Gridview control in aspx file and add the code in the code behind.
Let me know if you need any help. I would recommend considering pagination instead of displaying the data as it comes from stored procedure.
If you are satisfied with the answer, do not forget to mark it as accepted :)
Akkiraju IvaturiPosted Aug 20, 2012, 11:53 AM
Akkiraju IvaturiPosted Aug 20, 2012, 11:52 AM
Happy to know that it was useful for you.
Here is the aspx code:
Here is the code behind:
Nattudurai EswaramurthyPosted Aug 20, 2012, 6:33 AM
Write a procedure to return the value from SP(Which returns pivotal value)
bind the data to gridview. either u can create a model and bind it or simply bind the datasource to gridview
Bubai BanerjeePosted Aug 20, 2012, 3:10 AM
A heartly thanks to you as you save me from danger.Thanks a lot once again.But Sir,Please help me a little more to "How i display that result in front end Gridviiew (Asp.net).Because that is my requirement to display result in front end.please attach some more code with this blog please.
Thanks and Regards
Bubai Banerjee
Akkiraju IvaturiPosted Aug 18, 2012, 8:18 PM
Akkiraju IvaturiPosted Aug 18, 2012, 7:25 PM
I have taken your problem and created an article. Just look at the following link and it may help you.
http://ilovemicrosoft.blogspot.com/2012/08/displaying-rows-as-columns-with-total.html