how to disable selectedindexchanged event of dropdownlist

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sudhashekhar30
    New Member
    • Sep 2007
    • 44

    how to disable selectedindexchanged event of dropdownlist

    i am writting data in textbox and selecting list item in dropdownlist which matches from record retrieved from sql database. now i wanna to make dese data readonly. i just made false, readonly property of textbox.

    txtcode.raedonl y= true

    but don't no how to make readonly to dropdownlist so no one can see list and select dem. enable(false) property doesn't give good look.
  • nateraaaa
    Recognized Expert Contributor
    • May 2007
    • 664

    #2
    Originally posted by sudhashekhar30
    i am writting data in textbox and selecting list item in dropdownlist which matches from record retrieved from sql database. now i wanna to make dese data readonly. i just made false, readonly property of textbox.

    txtcode.raedonl y= true

    but don't no how to make readonly to dropdownlist so no one can see list and select dem. enable(false) property doesn't give good look.
    Can you just display the data from the drop down list in a label? It sounds like you do not need the drop down list functionality so why use it?

    Nathan

    Comment

    • jamesd0142
      Contributor
      • Sep 2007
      • 471

      #3
      how about combobox.enable d = false

      or listbox.enabled = false

      Comment

      • sudhashekhar30
        New Member
        • Sep 2007
        • 44

        #4
        Originally posted by nateraaaa
        Can you just display the data from the drop down list in a label? It sounds like you do not need the drop down list functionality so why use it?

        Nathan
        Thanx 4r reply. Dere is an asp.net form(contains textbox, dropdownlist etc.) user submits it. when user searches records, it is being displayed on the same form in respective controls(not using gridview for showing record) and controls are being made read only. now i want 2 make dropdown list readonly. "enabled=fa lse" property makes it readonly but its disabled which not looking good.

        Comment

        • sudhashekhar30
          New Member
          • Sep 2007
          • 44

          #5
          Originally posted by jamesd0142
          how about combobox.enable d = false

          or listbox.enabled = false
          Thanks 4r reply.But i am using dropdownlist and "enabled= false" not makes readonly.it's disabling control.

          Comment

          • rohitbce
            New Member
            • Aug 2007
            • 30

            #6
            If you Explain in detail exactly what you want then may be me or somebody help you
            you try this may be it will work
            Protected Sub Page_LoadComple te(ByVal sender As Object, ByVal e As System.EventArg s) Handles Me.LoadComplete
            Me.dropDivision Name.AutoPostBa ck = False
            ' Me.dropDivision Name.Enabled = False
            End Sub
            or otherwiswe set the autopostback property false
            Thanks and regards
            Rohit

            Comment

            Working...