Repeater Control - Suggestion?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm not sure if this is a good suggestion, or perhaps just my
mis-understanding, but something that seems obviously missing from the
ASP.Net Repeater control, is a "no results" template.

What I mean by this, is a template, to be used when the datasource for the
repeater does not contain any rows. At present, I am having to check the
number of rows in the table, and show or hide an additional <TR> depending on
the number of rows rendered by the repeater into the <TABLE>. This seems
foolish; surely it would be better for the repeater control to have a
template to display in the instance of the control not returning any data?

Can this be done using a cleaner/easier method than javascript?
 
Yes, this could be a nice new feature for the repeater/datalist/datagrid.

Meantime I don't see anything foolish in checking the number of rows in the
table. May be you could use footer template. To make it visible only if the
table is empty.

Eliyahu
 
it does in asp.net 2.0. for now any way that works is good...not one
particularly better than another imo.

Karl
 
This feature is not there in ASP.NET 1.1, but it is coming in ASP.NET2.0 as
EmptyDataTemple. You need to wait till that..
 
Back
Top