Deleting Drop Down List

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ummaria
    New Member
    • Mar 2007
    • 16

    Deleting Drop Down List

    Hello, I have a question about drop down list. How I can delete a selected item from drop down list after clicking the delete button ?

    Your help will be appreciate
  • dip_developer
    Recognized Expert Contributor
    • Aug 2006
    • 648

    #2
    Originally posted by ummaria
    Hello, I have a question about drop down list. How I can delete a selected item from drop down list after clicking the delete button ?

    Your help will be appreciate
    myCombo.Items.R emove(myCombo.S electedItem)

    Comment

    • ummaria
      New Member
      • Mar 2007
      • 16

      #3
      Originally posted by dip_developer
      myCombo.Items.R emove(myCombo.S electedItem)

      thanks a lot.....

      Comment

      • ummaria
        New Member
        • Mar 2007
        • 16

        #4
        Originally posted by dip_developer
        myCombo.Items.R emove(myCombo.S electedItem)

        Its deleting the items only from the list not from the database. How can I DELETE the whole row from the database?

        Comment

        • Teenzonez
          New Member
          • Mar 2007
          • 36

          #5
          you will be using C# and ADO.NET i hope..
          use the sqlcommand object to assign a query to delete the record we need..
          then then use the executenonquery ...

          Hope this will solve your doubts

          Regards
          TeenzoneZ

          Comment

          • swagat
            New Member
            • Apr 2007
            • 2

            #6
            I want to bind and display one field (i,e Common_Desc of table T_MST_ADM_COMMO N which is having 4 fields ) in a drop down list .

            What my problem is when i'll click on a add button of one panel (main panel) ,another panel (addpanel) in same master page ll come and the datas should be displayed on the drop down list .

            and i could not able to understand on which event i should write,& how to bind;
            please give me ideas By which i can proceed .

            Thanks

            Comment

            • ummaria
              New Member
              • Mar 2007
              • 16

              #7
              Originally posted by Teenzonez
              you will be using C# and ADO.NET i hope..
              use the sqlcommand object to assign a query to delete the record we need..
              then then use the executenonquery ...

              Hope this will solve your doubts

              Regards
              TeenzoneZ
              I am using VB.NET/ ASP.NET in Visual Studio.

              Comment

              • Teenzonez
                New Member
                • Mar 2007
                • 36

                #8
                I dont use VB.NET
                Wait for sometime...some one else will help you soon
                For ur second question also I posted solution...
                That too wont work...because its also in C# only..

                Regards
                TeenzoneZ

                Comment

                • ummaria
                  New Member
                  • Mar 2007
                  • 16

                  #9
                  Originally posted by Teenzonez
                  I dont use VB.NET
                  Wait for sometime...some one else will help you soon
                  For ur second question also I posted solution...
                  That too wont work...because its also in C# only..

                  Regards
                  TeenzoneZ

                  Thank any way

                  Comment

                  Working...