Taming DataList With a Custom Adapter
Posted by: AspNetResources.com articles, news and updates,
on 01 Nov 2007 |
View original | Bookmarked: 0 time(s)
Suppose you want to extend a DataList and have it put out a div for each row. The RepeatLayout property can be either Flow (“Items are displayed without a table structure”) or
Table (“Items are displayed in a table”). Since we want divs, we’re after RepeatLayout = RepeatLayout.Flow. Not so fast, though. This control isn’t that easy to extend.
What you get is a <span> which wraps the rest of the markup. More so, <div> rows are separated with superfluous...