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. DropDownList in GridView

DropDownList in GridView

Scheduled Pinned Locked Moved ASP.NET
tutorial
6 Posts 3 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
    AS 13
    wrote on last edited by
    #1

    hi, Can anyone tell me how to bind a DataTable Column field to a DropDownList Items which is present in a GridView. DataTable and GridView is generated at runtime.

    A key to every Solution

    N M 2 Replies Last reply
    0
    • A AS 13

      hi, Can anyone tell me how to bind a DataTable Column field to a DropDownList Items which is present in a GridView. DataTable and GridView is generated at runtime.

      A key to every Solution

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      You need to find DropDown from GridView in GridView's RowDataBound event and bind it.

      All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

      A 2 Replies Last reply
      0
      • A AS 13

        hi, Can anyone tell me how to bind a DataTable Column field to a DropDownList Items which is present in a GridView. DataTable and GridView is generated at runtime.

        A key to every Solution

        M Offline
        M Offline
        Michael Sync
        wrote on last edited by
        #3

        You can add the dropdownlist to the template column at runtime. then, In rowcreated event of Gridview, you can find the dropdownlist that you have added and bind the data.

        Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

        A 1 Reply Last reply
        0
        • N N a v a n e e t h

          You need to find DropDown from GridView in GridView's RowDataBound event and bind it.

          All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

          A Offline
          A Offline
          AS 13
          wrote on last edited by
          #4

          Thanks, Can I add it like Eval on Bind method as we do for label.. CUST_ID ]]>' runat="server"> I have the DropDownList instead of Label and CUST_ID is the Column anme present in the DataTable

          A key to every Solution

          1 Reply Last reply
          0
          • N N a v a n e e t h

            You need to find DropDown from GridView in GridView's RowDataBound event and bind it.

            All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

            A Offline
            A Offline
            AS 13
            wrote on last edited by
            #5

            Thanks, Can I add it like Eval on Bind method as we do for label.. CUST_ID ]]>' runat="server"> I have the DropDownList instead of Label and "CUST_ID" is the Column name present in the DataTable

            A key to every Solution

            1 Reply Last reply
            0
            • M Michael Sync

              You can add the dropdownlist to the template column at runtime. then, In rowcreated event of Gridview, you can find the dropdownlist that you have added and bind the data.

              Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

              A Offline
              A Offline
              AS 13
              wrote on last edited by
              #6

              hi, thanks friend.. can u give a sample of code how to it...

              A key to every Solution

              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