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. Dynamically setting width of controls

Dynamically setting width of controls

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

    Hello, I have some controls created at ItemDatabound. (created at itemdatabound because at item databound , i know which type of control to create). In these controls, i have a button which increases size according to its Text. i want to fix the size for all other controls based on size of this button but when i get the width of button, it gives me 0 pixels. Can anybody provide an idea on how to set the width for the rest of the controls. i have tried grid's pre render method but somehow i cant find any of the controls created in itemdatabound . Thanks Mark

    L 1 Reply Last reply
    0
    • M mark_me

      Hello, I have some controls created at ItemDatabound. (created at itemdatabound because at item databound , i know which type of control to create). In these controls, i have a button which increases size according to its Text. i want to fix the size for all other controls based on size of this button but when i get the width of button, it gives me 0 pixels. Can anybody provide an idea on how to set the width for the rest of the controls. i have tried grid's pre render method but somehow i cant find any of the controls created in itemdatabound . Thanks Mark

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      You need to do one thing. Just change size of every dependent controls when the size of your button changed. Not on ItemDataBound event. You can use load event for the same. HTH

      Jinal Desai - LIVE Experience is mother of sage....

      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