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
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