add a row to a repeater

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

Guest

I have a repeater bound to a collection of business objects:

ScoresRepeater.DataSource = objReferralTestScore.TestScore;
ScoresRepeater.DataBind();

How can I add a "new" row to the repeater without adding to the collection
of bus objects?

Thanks in advance, Jack.
 
Jack,
If you're always going to be adding a row, it's it easier to just do:

objRefferaltestScore.TestScore.Add(new ObjName);

You can then use the Repeater.ItemDataBound event to look for when that row
is being rendered and change how it's rendered.

Here's info on the event:
http://msdn.microsoft.com/library/d...ebcontrolsrepeaterclassitemdataboundtopic.asp

Not the exact answer you're looking for.

Another option is to create a new custom control that inherits from
Repeater. This custom control would always adds a row at the end, probably
during the OnRender event handler.

HTH

Steve
 
Back
Top