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. dinamic textbox in gridview

dinamic textbox in gridview

Scheduled Pinned Locked Moved ASP.NET
csswpfwcf
4 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.
  • A Offline
    A Offline
    Abolfazl Sheikhloo
    wrote on last edited by
    #1

    i am adding textbox to a column of gridview dinamically. 1 - if i use from OnRowCreated, its not applying in grid binding and must be postback page to apply it. 2 - if i use from OnDataBound, its apply in grid binding but lost box's in post back codes: 1 - OnRowCreated { e.Row.Cells[3].Controls.Add(new TextBox()); } 2 - OnDataBound { foreach(GridViewRow row in grid1.Rows) row.Cells[3].Controls.Add(new TextBox()); }

    We Can Do Anything, If We Want It

    S 1 Reply Last reply
    0
    • A Abolfazl Sheikhloo

      i am adding textbox to a column of gridview dinamically. 1 - if i use from OnRowCreated, its not applying in grid binding and must be postback page to apply it. 2 - if i use from OnDataBound, its apply in grid binding but lost box's in post back codes: 1 - OnRowCreated { e.Row.Cells[3].Controls.Add(new TextBox()); } 2 - OnDataBound { foreach(GridViewRow row in grid1.Rows) row.Cells[3].Controls.Add(new TextBox()); }

      We Can Do Anything, If We Want It

      S Offline
      S Offline
      Saksida Bojan
      wrote on last edited by
      #2

      You have to use Templates to do it

      A 1 Reply Last reply
      0
      • S Saksida Bojan

        You have to use Templates to do it

        A Offline
        A Offline
        Abolfazl Sheikhloo
        wrote on last edited by
        #3

        can you say me that how to add dinamic textbox to templatefield

        We Can Do Anything, If We Want It

        S 1 Reply Last reply
        0
        • A Abolfazl Sheikhloo

          can you say me that how to add dinamic textbox to templatefield

          We Can Do Anything, If We Want It

          S Offline
          S Offline
          Saksida Bojan
          wrote on last edited by
          #4

          there are 2 links i have for you: MSDN[^] Developer Solution[^] Or wait until i get home.

          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