This project is read-only.

DataListAdapter - Renders container despite empty item collection.


When the DataList contains no items, it shoudn't render anything.
At the moment it still renders the outer container and an empty table.
At the moment, the work around is to hook into the DataList.PreRender event and check the item count and if so add AdapterEnabled = "false" to the list's Attributes collection.


genbox wrote Dec 10, 2009 at 12:15 AM

See patch #4611 here:
It fixes this bug in a different manner than described by issue report creator. It checks the item count inside the adapter and only renders start or end tags together with the content, if the item count is higher than 0.

genbox wrote Dec 11, 2009 at 1:16 AM

There is an update to patch #4611 called #4623

wrote Feb 14, 2013 at 9:44 PM