Click here to Skip to main content
15,909,091 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
I am using asp.net 3.5 c# to create website. i want to display grid view with template field row header as current week days to get input values from users.
example:
Project Sub_Project Sun-12/06/11 Mon-13/06/11 Tue-14/06/11 ..... Sat-18/06/11
I can get current date as row header using following code
<columns>
<asp:TemplateField>
 <HeaderTemplate>
  <%= DateTime.Now.ToShortDateString() %>
 </HeaderTemplate>

<asp:TemplateField>
 <HeaderTemplate>
  <%= DateTime.Now.AddDays(1).ToShortDateString() %>
 </HeaderTemplate>

</columns> 

I want to display grid view header as current week dates to get inputs from user for a week.
Posted
Updated 14-Jun-11 3:29am
v4
Comments
R. Giskard Reventlov 14-Jun-11 6:14am    
So go ahead and do it. What's the problem?
[no name] 14-Jun-11 7:10am    
What is your problem?

This is not a question. You should buy some books and read them. Then you should ask your question when you have tried to do something and are stuck on something specific. What you want is not even clear. One hear lists the week days ? Or there's a header above each column ? This sounds trivial in any case, you should at least try.
 
Share this answer
 
Put one table in gridview header template. create cells and put labels in cells.
on back-end, set label text as week days.
 
Share this answer
 
your question is not cleared... what you want to ask and what you want to do with this code...??
although i'm posting some of the link below that is related to gridview, kindly see it, that may help you...

Link1[^]
Link2[^]
Link3[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900