repeater control addat method postion.

G

Guoqi Zheng

Sir,

A few days ago, I asked a question about how to insert something into the
last row of a repeater control. I got the following code from Ken,


Private Sub Page_PreRender (ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.PreRender
Dim itm As RepeaterItem
itm = Repeater1.Items(Repeater1.Items.Count - 1)
Dim lblNotice As New Label
lblNotice.Text = "Last>>>"
itm.Controls.AddAt(0, lblNotice)
End Sub

It works very fine, it inserts a "Last>>>" at the begin of that row. My
question is that is it possible to insert some string into a special postion
on the repeater rows?

For example, I have

<asp:Repeater id="Datatable" runat="server">

<ItemTemplate>
<tr>
<td><%#Container.DataItem("strName")%></td><td>{here I want some text
only for last row}</td><td>soem text here</td>
</tr>
</ItemTemplate>
</asp:Repeater>

Is it possible to define the index ourselve and insert text at that special
position?

Thanks in advanced.

--
Kind regards

Guoqi Zheng
guoqi AT meetholland dot com
Http://www.meetholland.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top