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. Dropdown in GridView template Column

Dropdown in GridView template Column

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nethelpquestion
4 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.
  • C Offline
    C Offline
    codingrocks
    wrote on last edited by
    #1

    I tried to get the Id of a dropdown list in a gridview in my application. But I tried to get using this code... Inside a protected void Function DropDownList ddlFilter = (DropDownList)gvCRMODField.FindControl("ddlFilterCriteria"); But it is showing the value Null on runtime. How can i know the ID of this dropdown using FindControl in the function Any help would be thankful..

    SAJAN A PILLAI ASP.NET,C#.NET Programmer BANGALORE "Winners don't do different things. They do things differently. ...

    P 1 Reply Last reply
    0
    • C codingrocks

      I tried to get the Id of a dropdown list in a gridview in my application. But I tried to get using this code... Inside a protected void Function DropDownList ddlFilter = (DropDownList)gvCRMODField.FindControl("ddlFilterCriteria"); But it is showing the value Null on runtime. How can i know the ID of this dropdown using FindControl in the function Any help would be thankful..

      SAJAN A PILLAI ASP.NET,C#.NET Programmer BANGALORE "Winners don't do different things. They do things differently. ...

      P Offline
      P Offline
      Parwej Ahamad
      wrote on last edited by
      #2

      It may be for first grid row (Header). I mean to say in case of first row but did you try for second row.

      Parwej Ahamad

      C 1 Reply Last reply
      0
      • P Parwej Ahamad

        It may be for first grid row (Header). I mean to say in case of first row but did you try for second row.

        Parwej Ahamad

        C Offline
        C Offline
        codingrocks
        wrote on last edited by
        #3

        The dropdown list is in the third row of the GridView.....

        SAJAN A PILLAI ASP.NET,C#.NET Programmer BANGALORE "Winners don't do different things. They do things differently. ...

        N 1 Reply Last reply
        0
        • C codingrocks

          The dropdown list is in the third row of the GridView.....

          SAJAN A PILLAI ASP.NET,C#.NET Programmer BANGALORE "Winners don't do different things. They do things differently. ...

          N Offline
          N Offline
          Nishant Singh
          wrote on last edited by
          #4

          U need to loop through all rows of the Grid In the loop assign the current row to the GridViewRow object then u can use find control .....

          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