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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Rename a template column control at runtime

Rename a template column control at runtime

Scheduled Pinned Locked Moved ASP.NET
1 Posts 1 Posters 1 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.
  • C Offline
    C Offline
    ColdWaterBlue
    wrote on last edited by
    #1

    I am trying to rename a textbox within a template column at runtime. I need to do this at runtime because the number of columns will change, upwards of 1000 columns. Since there is no VB code to dynamically create a template column with a textbox control, I created a hidden datagrid with the template column, and then at runtime I am copying the column to my visible datagrid and using it for each column. This then throws a HTTPException because it can't distinguish between the different columns' textboxes. Short of creating all 1000 columns in the hidden datagrid and copying over the corresponding column, is there any way to change the name of the textbox for each column as the column is being created. I know that the ItemCreated event is only raised when the datagrid rows are populated, so I cannot use this to change the name. Any suggestions would be greatly appreciated ColdWaterBlue - Rock On!

    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