Disable Items in DropDownList

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kewldudehere
    New Member
    • Jan 2007
    • 58

    Disable Items in DropDownList

    Hi All,

    Is it Possible to disable or greyout some items in dropdownlist. My application is role based and want to disable selection of some items in dropdownlist based upon user role. But i want to show all items in dropdownlist.

    Thanks
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by kewldudehere
    Hi All,

    Is it Possible to disable or greyout some items in dropdownlist. My application is role based and want to disable selection of some items in dropdownlist based upon user role. But i want to show all items in dropdownlist.

    Thanks
    Hi, you should have posted your question in the .NET Forum section; not here in
    the .NET Articles section; I'll move your question to the forum.

    kind regards,

    Jos

    Comment

    • nmsreddi
      Contributor
      • Jul 2006
      • 366

      #3
      Originally posted by JosAH
      Hi, you should have posted your question in the .NET Forum section; not here in
      the .NET Articles section; I'll move your question to the forum.

      kind regards,

      Jos
      Hello

      i think you can solve your problem by simple trick

      write the code in comboselectedin dexchanged such that ,if the user selects a particular item for which he is not eligible ,then check that with combobox selected property and if he is not eligible then redirect to a default item else allow it,

      try it out may work

      regards

      Comment

      Working...