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. how to create itemtemplate in datalist

how to create itemtemplate in datalist

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nethelptutorial
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.
  • I Offline
    I Offline
    imranafsari
    wrote on last edited by
    #1

    Dear all, i am using asp.net2.0 , C# i want to know how to create itemtemplate at run time. please help thanks

    imran khan

    L 1 Reply Last reply
    0
    • I imranafsari

      Dear all, i am using asp.net2.0 , C# i want to know how to create itemtemplate at run time. please help thanks

      imran khan

      L Offline
      L Offline
      l0kke
      wrote on last edited by
      #2

      create class that implements interface System.Web.UI.ITemplate class MyItemTemplate : ITemplate { public void InstantiateIn(Control container) { // add any controls you wish into container.Controls[] collection } } TemplateField myTemplateField = new TemplateField(); myTemplateField.ItemTemplate = new MyItemTemplate(); myGridView.Columns.Add(myTemplateField); hope that helps. Pilo

      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