Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Dynamically generated repeaters and the 'AddAt' method

Dynamically generated repeaters and the 'AddAt' method

Scheduled Pinned Locked Moved ASP.NET
javascriptdesigndocker
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hendrik Debedts
    wrote on last edited by
    #1

    I want to use the 'AddAt' method with a dynamically generated repeater. It doesn't work. It's just like the whole repeater has only one item because i only can add an item 'before' or 'after' the whole repeater. I use this ItemTemplate class Public Class clsNavigatieDetail1ItemTemplate Implements ITemplate Private mboOpgevuld As Boolean Private moRepeater As Repeater Private msNavigatieDetail1 As String Public Sub InstantiateIn(ByVal container As System.Web.UI.Control) Implements System.Web.UI.ITemplate.InstantiateIn Try If Not mboOpgevuld Then mboOpgevuld = True Dim oDataTable As DataTable oDataTable = CType(moRepeater.DataSource, DataTable) For i As Integer = 0 To oDataTable.Rows.Count - 1 Dim sItem As String sItem = "<div class='NavigatieMenuDetail1'>" sItem += "<div class='divMenuCell3' class='NavigatieMenuDetail1'> </div>" sItem += "<div class='divMenuCell4'>" sItem += "<a href='javascript:doPostback();setNavigatieDetail1 (" + oDataTable.Rows(i)("IDSubNavigatie1").ToString + ");'>" sItem += oDataTable.Rows(i)("OmschrijvingSubNavigatie") sItem += "</a>" sItem += "</div></div>" Dim oLiteralControl As New LiteralControl oLiteralControl.Text = sItem container.Controls.Add(oLiteralControl) Next End If Catch End Try End Sub Public Sub New(ByVal oRepeater As Repeater, ByVal sNavigatieDetail1 As String) mboOpgevuld = False moRepeater = oRepeater msNavigatieDetail1 = sNavigatieDetail1 End Sub End Class

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups