Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
95
UltraOptionSet
posted

Hi,

With the UltraOptionSet, I know you're able to add options progrmatically, but is there a way to 'disable' some of them in the list?

For example: Have an option set list displayed to the user: Favourite colors: Red, White, Blue, Black.
But we know that this particular user will never choose 'Blue', so 'disable' this option, (don't allow the user to select it, but let it be displayed dimmed, and the other options selectable).


 

 

  • 460
    posted

    I had the same issue, I went with the System.Windows.Forms.OptionButton, with the MS control each radio button is its own control and they all sit in a goupo box container, but you have to write a bit more coding like in the old days...

  • 469350
    Verified Answer
    Offline posted

    No, there's no way to disable an item. You can remove it, though.

    An alternative would be to use a different OptionSet control for each choice. You would then have to code it so that only one is selected at a time by handling the ValueChanged event. Then you could disable one control. It kinda defeats one of the main advantages of the OptionSet, but you would still gain the benefit of all the appearance and styling features.