Hello,
I have created a GridView on runtime by implementing the ITemplate
class.
This Gridview displays a list of articles. Each article has a Title,
Content and PubDate.
I am trying to create a Date Header like in a blog, i.e., display the
date on top of every daily posts.
For example:
Wednesday, 25 of April of 2007
Article 3 (PubDate: 25.04.2007 # 20:15)
Article 2 (PubDate: 25.04.2007 # 11:30)
Article 1 (PubDate: 25.04.2007 # 08:40)
Wednesday, 24 of April of 2007
Article 2 (PubDate: 24.04.2007 # 21:32)
Article 1 (PubDate: 24.04.2007 # 15:45)
How can I created the date header as I described?
Thanks,
Miguel 4 2251
I'm not sure the GridView control is the best choice for this kind of
display.
Perhaps another control would be better, such as a Table control or
repeater.
--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider http://SteveOrr.net
"shapper" <md*****@gmail.comwrote in message
news:11**********************@t38g2000prd.googlegr oups.com...
Hello,
I have created a GridView on runtime by implementing the ITemplate
class.
This Gridview displays a list of articles. Each article has a Title,
Content and PubDate.
I am trying to create a Date Header like in a blog, i.e., display the
date on top of every daily posts.
For example:
Wednesday, 25 of April of 2007
Article 3 (PubDate: 25.04.2007 # 20:15)
Article 2 (PubDate: 25.04.2007 # 11:30)
Article 1 (PubDate: 25.04.2007 # 08:40)
Wednesday, 24 of April of 2007
Article 2 (PubDate: 24.04.2007 # 21:32)
Article 1 (PubDate: 24.04.2007 # 15:45)
How can I created the date header as I described?
Thanks,
Miguel
Miguel,
you can use the RowDataBound event, and check if the rowtype is Header, then
set the text you want, like:
If e.Row.RowType = DataControlRowType.Header Then
e.Row.Cells(0).Text = Now.ToString
End If
Bruno
"shapper" <md*****@gmail.comwrote in message
news:11**********************@t38g2000prd.googlegr oups.com...
Hello,
I have created a GridView on runtime by implementing the ITemplate
class.
This Gridview displays a list of articles. Each article has a Title,
Content and PubDate.
I am trying to create a Date Header like in a blog, i.e., display the
date on top of every daily posts.
For example:
Wednesday, 25 of April of 2007
Article 3 (PubDate: 25.04.2007 # 20:15)
Article 2 (PubDate: 25.04.2007 # 11:30)
Article 1 (PubDate: 25.04.2007 # 08:40)
Wednesday, 24 of April of 2007
Article 2 (PubDate: 24.04.2007 # 21:32)
Article 1 (PubDate: 24.04.2007 # 15:45)
How can I created the date header as I described?
Thanks,
Miguel
On Apr 25, 6:29 pm, "Steve C. Orr [MCSD, MVP, CSM, ASP Insider]"
<S...@Orr.netwrote:
I'm not sure the GridView control is the best choice for this kind of
display.
Perhaps another control would be better, such as a Table control or
repeater.
--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsiderhttp://SteveOrr.net
"shapper" <mdmo...@gmail.comwrote in message
news:11**********************@t38g2000prd.googlegr oups.com...
Hello,
I have created a GridView on runtime by implementing the ITemplate
class.
This Gridview displays a list of articles. Each article has a Title,
Content and PubDate.
I am trying to create a Date Header like in a blog, i.e., display the
date on top of every daily posts.
For example:
Wednesday, 25 of April of 2007
Article 3 (PubDate: 25.04.2007 # 20:15)
Article 2 (PubDate: 25.04.2007 # 11:30)
Article 1 (PubDate: 25.04.2007 # 08:40)
Wednesday, 24 of April of 2007
Article 2 (PubDate: 24.04.2007 # 21:32)
Article 1 (PubDate: 24.04.2007 # 15:45)
How can I created the date header as I described?
Thanks,
Miguel
Hello Steve,
My main problem is that I would also need to have paging. I think
Asp.Net 2.0 Repeater does not have paging.
Any idea?
And how can I determine if the Date Header should be added or not?
Thanks,
Miguel
On Apr 25, 10:34 pm, "Bruno Piovan" <brunopiovan AT gmail DOT com
(NOSPAM!)wrote:
Miguel,
you can use the RowDataBound event, and check if the rowtype is Header, then
set the text you want, like:
If e.Row.RowType = DataControlRowType.Header Then
e.Row.Cells(0).Text = Now.ToString
End If
Bruno
"shapper" <mdmo...@gmail.comwrote in message
news:11**********************@t38g2000prd.googlegr oups.com...
Hello,
I have created a GridView on runtime by implementing the ITemplate
class.
This Gridview displays a list of articles. Each article has a Title,
Content and PubDate.
I am trying to create a Date Header like in a blog, i.e., display the
date on top of every daily posts.
For example:
Wednesday, 25 of April of 2007
Article 3 (PubDate: 25.04.2007 # 20:15)
Article 2 (PubDate: 25.04.2007 # 11:30)
Article 1 (PubDate: 25.04.2007 # 08:40)
Wednesday, 24 of April of 2007
Article 2 (PubDate: 24.04.2007 # 21:32)
Article 1 (PubDate: 24.04.2007 # 15:45)
How can I created the date header as I described?
Thanks,
Miguel
Hi Bruno,
Got lost about it. See that in my articles list I will have various
headers. One data header for each date.
Please see the following blog: http://blogs.publico.pt/artephotographica/
If you scroll down to 12 of April you will see that date header has
more then one post under it.
So each date header is added only when the post is a new article.
Thanks,
Miguel This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Smokey Grindle |
last post by:
In .NET 1.1 I could have a column bound with date/time fields.. then say the
format of it was this {0:MMM d,yyyy h:mm tt} and it would display in this
format
Jan 1, 2006 2:03 PM
however in...
|
by: puja |
last post by:
hi all,
am using grid view in asp.net 2.0 . My problem is easy but can't get it to
work.
My grid view id = grdContract and am binding grid view using dataset My
dataset returns 5 columns from...
|
by: parez |
last post by:
Hi all,
I have a storep procedure which returns 5 columns.
i want to show only two columsn in the grid view. first column is a
link based on some 3 of the columns.
i added the following in...
|
by: probashi |
last post by:
Hi,
Using the SqlDataSource/SelectParameters/ControlParameter one can
easily bind a Grid View with a list box (or any other controls), pretty
cool, but my list box is multi select.
My...
|
by: brwalias |
last post by:
Hi,
using .net 2
sql server 2005
Here is my situation:
I'm passing a variable in the url from a selection on Page A and need
to display the results on the Results page be based on that...
| |
by: =?Utf-8?B?Ym9iYnk=?= |
last post by:
I have a Grid View. Here I have a column "Active". I attached this GridView
to objectDataSource. In database this field has true or false value.(1 or
0). But in Grid View I want to show that if...
|
by: shahidrasul |
last post by:
hi
in my project a data grid view in which is show a list of employees which i get from database, i add a even double click on any cell , when i click on any cell, i want to display a form to...
|
by: cadab |
last post by:
I have a data grid view, i have specified several columns through the designer that i would like to show on the grid, i have mapped them to the datasource, this works fine, the problem is, my data...
|
by: AnagJohari |
last post by:
actually i want to edit the row of an grid view by code behind not using any sql data source. u know that that show edit button property in a grid view
when we set this property to true &...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |