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. how to include a DropDownList in to the DataList for EditItem?

how to include a DropDownList in to the DataList for EditItem?

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

    I had 2 table in database Category(CategoryID, Name) ChildCategory(ChildCategoryID,Name,CategoryID) I want to use DataList for edit the ChildCategory table in EditItemTemplate I write: runat="server"/> runat="server"/> The textbox CategoryID will show the value that reference to the Category(CategoryID). But I want to use a DropDownList for use select from a list that select from Category table. Have anyone experience with this case, please help me to create it step by step...Thank a lot.

    S 1 Reply Last reply
    0
    • C cool_man

      I had 2 table in database Category(CategoryID, Name) ChildCategory(ChildCategoryID,Name,CategoryID) I want to use DataList for edit the ChildCategory table in EditItemTemplate I write: runat="server"/> runat="server"/> The textbox CategoryID will show the value that reference to the Category(CategoryID). But I want to use a DropDownList for use select from a list that select from Category table. Have anyone experience with this case, please help me to create it step by step...Thank a lot.

      S Offline
      S Offline
      Steve McLenithan
      wrote on last edited by
      #2

      http://www.4guysfromrolla.com/webtech/050801-1.shtml[^]

      // Steve McLenithan

      Cluelessnes:
         There are no stupid questions, but there are a lot of inquisitive idiots.

      C 2 Replies Last reply
      0
      • S Steve McLenithan

        http://www.4guysfromrolla.com/webtech/050801-1.shtml[^]

        // Steve McLenithan

        Cluelessnes:
           There are no stupid questions, but there are a lot of inquisitive idiots.

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

        Thanks, Steve McLenithan!

        1 Reply Last reply
        0
        • S Steve McLenithan

          http://www.4guysfromrolla.com/webtech/050801-1.shtml[^]

          // Steve McLenithan

          Cluelessnes:
             There are no stupid questions, but there are a lot of inquisitive idiots.

          C Offline
          C Offline
          cool_man
          wrote on last edited by
          #4

          Thank Steve! I want to control a selected Item when the dropdownlist show in EditItemTemplate, how can i do that? Help me, please...

          S 1 Reply Last reply
          0
          • C cool_man

            Thank Steve! I want to control a selected Item when the dropdownlist show in EditItemTemplate, how can i do that? Help me, please...

            S Offline
            S Offline
            Steve McLenithan
            wrote on last edited by
            #5

            cool_man wrote: I want to control a selected Item I don't understand what it is you are wanting to do... Could you please elaborate?

            // Steve McLenithan

            Cluelessnes:
               There are no stupid questions, but there are a lot of inquisitive idiots.

            C 1 Reply Last reply
            0
            • S Steve McLenithan

              cool_man wrote: I want to control a selected Item I don't understand what it is you are wanting to do... Could you please elaborate?

              // Steve McLenithan

              Cluelessnes:
                 There are no stupid questions, but there are a lot of inquisitive idiots.

              C Offline
              C Offline
              cool_man
              wrote on last edited by
              #6

              Ex: I have 2 table: ParentCategory(PID,Name) ChildCategory(CID,Name,PID) I bind ChildCategory table to a datagrid with columnbound(Name,PID) when edit datagrid, I include a dropdownlist with BindData from ParentCategory table, but I can't make selected Item(PID) for this dropdownlist. Can u help me please? Thanks

              S 1 Reply Last reply
              0
              • C cool_man

                Ex: I have 2 table: ParentCategory(PID,Name) ChildCategory(CID,Name,PID) I bind ChildCategory table to a datagrid with columnbound(Name,PID) when edit datagrid, I include a dropdownlist with BindData from ParentCategory table, but I can't make selected Item(PID) for this dropdownlist. Can u help me please? Thanks

                S Offline
                S Offline
                Steve McLenithan
                wrote on last edited by
                #7

                Sorry but I do not know how to do this exactly.

                // Steve McLenithan

                Cluelessnes:
                   There are no stupid questions, but there are a lot of inquisitive idiots.

                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