Each set of ASP.NET repeater heads (ie months)

I have a data source, each row contains date items. These will be bound to the transponder and sorted by date. I want to render each month as a separate table when rendering , But is there a way to do this using the repeater control without dynamically adding multiple repeaters from the server-side code?

Ideally, I want the following:

Examples Data:

Row 1: Title 1 , 01/12/2009
Row 2: Title 1, 02/12/2009
Row 1: Title 1, 01/01/2010
Row 1: Title 1, 02/01/ 2009

Required output:

Dec 09
------------------------ -------
Title | Date |
------------------------------- |
Title1 | 01/12/2009 |
-------------------------------|< br />Title2 | 02/12/2010 |
-------------------------------|

Jan 10
-------------------------------
Title | Date |
-------------------------------|
Title1 | 01/01/2010 |
-------------------------------|
Title2 | 02/01/2010 |
-------------------------------|

You can use the PlaceHolder control in ItemTemplate to include repeated goup headers and footers. Then set the visibility of PlaceHolders in OnItemDataBound or OnItemCreated event handlers based on the date. Like this :








<% # _monthHeader














Title Date

I have a data source with date items in each row. These will be bound to the transponder and sorted by date. I want to render each month as A separate table is rendered, but is there a way to use the repeater control to do this without dynamically adding multiple repeaters from the server-side code?

Ideally, I want the following:

Examples Data:

Row 1: Title 1 , 01/12/2009
Row 2: Title 1, 02/12/2009
Row 1: Title 1, 01/01/2010
Row 1: Title 1, 02/01/ 2009

Required output:

Dec 09
------------------------ -------
Title | Date |
------------------------------- |
Title1 | 01/12/2009 |
-------------------------------|< br />Title2 | 02/12/2010 |
-------------------------------|

Jan 10
-------------------------------
Title | Date |
-------------------------------|
Title1 | 01/01/2010 |
-------------------------------|
Title2 | 02/01/2010 |
-------------------------------|

You can use the PlaceHolder control in the ItemTemplate to include repeated goup headers and footers. Then set the visibility of PlaceHolders in the OnItemDataBound or OnItemCreated event handlers based on the date. Like this:

< /p>








<%# _monthHeader














Title Date

Leave a Comment

Your email address will not be published.