Hi,
How can I programmatically disable an Option set value. I dont want to remve it, just disable it.
The reason is that I have 2 Option sets, and selecting a Value in the first set automatically selects a corresponding value in the second one, and makes the other options in the second one unselectable.
Many thanks
Jason
Hi.
How Cancel the selection to certain option.
Example
I use the ValueChanged, to validate certains conditions, if some it's correct then accept this,
but it's false to reject the operation, and i need to return the original state of the selecction.
I don't think you can cancel the change. ValueChanged is past tense - it means that value has already changed. So it's too late to cancel.
I don't think the OptionSet has an event that fires before the selection changes. You should be able to set the Value or CheckedIndex inside the ValueChanged event to set it back to what it was. But you would have to keep track of the old value and also deal with how to avoid recursion (probably using the EventManager to disable the ValueChanged event while you are in it).