I am trying to set the CheckedIndex for the UltraOptionSet control.
Stepping through the debugger, when I first reach the line of code, the CheckedIndex value is -1.
The code then sets the value to 1.
The value immediately goes back to zero.
If I go to the locals window and change the CheckedIndex value to 1, it again goes right back to 0.
There are 3 items in the list but I cannot get the value to change.
What am I missing here. All the samples show setting the CheckedIndex.
Please help
Thanks
Ben
Hi Ben,
There are two possibilities that I can think of here:
First, it's possible that the CheckedIndex is being set too soon. This might be before initialization or painting has occurred. In order to check whether this is the case, try setting CheckedIndex on a button press and see if the behavior is different. If so, this is the issue and you will need to set the value at a later point.
Second, this might be happening if two items have the same text. Please let me know if this is the case and it cannot be changed and I will look into a solution for you.
If neither of these situations applies, please put together a small reproduction sample and upload it here. I will look into the sample to determine why setting CheckedIndex is not having the expected effect.