am building a dynamic repeater to show the schedual of a radio station. the code goes like below, i need to replace i with the value of the current row.
please help
Dim
rpdayname As
New Repeater
pageview.Controls.Add(rpdayname)
rpdayname.DataSource = sd
Dim rpitem
As New TemplateBuilder
Dim entry As
String
i= " show contain the row number of the created repeater"
daoud
Member
130 Points
26 Posts
displaying Repeater Row Number dynamically
Jun 29, 2006 01:21 PM|LINK
am building a dynamic repeater to show the schedual of a radio station. the code goes like below, i need to replace i with the value of the current row.
please help
Dim
rpdayname As New Repeaterpageview.Controls.Add(rpdayname)
rpdayname.DataSource = sd
Dim rpitem As New TemplateBuilder Dim entry As Stringi= " show contain the row number of the created repeater"
entry = Format(dv(i)("SchedualStart"), "t") & ":" & Format(dv(i)("SchedualStart"), "t") & " " & dv(i)("ProgramTitle") & "<br>"
rpitem.AppendLiteralString(entry)
rpdayname.ItemTemplate = rpitem
rpdayname.DataBind()
Web & Multimedia Developer
Email: daoud@dajani.info
URL: daoud.dajani.info
Palestine
XIII
All-Star
182674 Points
23445 Posts
ASPInsiders
Moderator
MVP
Re: displaying Repeater Row Number dynamically
Jun 29, 2006 01:29 PM|LINK
Hi,
maybe you can use this technique: create an itemtemplate and in that place <%# Container.ItemIndex + 1 %>
I blogged about this in some more details a while ago: Autonumbering ASP.NET grid controls.
Grz, Kris.
Interested in Azure, ASP.NET (MVC), jQuery, WCF, EF, MS SQL, ...
Keep the forums clean: report to the moderation team!