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. Repeater DateItem

Repeater DateItem

Scheduled Pinned Locked Moved ASP.NET
question
2 Posts 2 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.
  • D Offline
    D Offline
    Dominic Farr
    wrote on last edited by
    #1

    I have a Repeater with many rows. However, when I foreach through the items the DataItem is null. Why can I not get the DataItem from my Repeater? Or maybe a better question would be, how do I get the DataItems from my repeater? thank you -- modified at 13:11 Thursday 12th January, 2006

    D 1 Reply Last reply
    0
    • D Dominic Farr

      I have a Repeater with many rows. However, when I foreach through the items the DataItem is null. Why can I not get the DataItem from my Repeater? Or maybe a better question would be, how do I get the DataItems from my repeater? thank you -- modified at 13:11 Thursday 12th January, 2006

      D Offline
      D Offline
      Daniel Santillanes
      wrote on last edited by
      #2

      Hi Dominic The DataItem property for your controls are only available right after calling the Databind Method of the repeater, and only on the ItemCreated / ItemDataBound Event, but beware: ItemCreated is called after each postback, so try to use DataItem only in the ItemDataBound event. after that, it no longer exists. So This event (ItemDataBound) is raised for each item being databound to the source you assigned. The item is found in the event's arguments. Just a plus in case you didn't know. daniero

      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