AllowedValues

Topics: User Forum
Apr 13, 2010 at 11:46 AM

Hi,

I imported this control in my TFS 2010 installation and it worked a treat. One thing I wanted to find out is that I was not able to make it work with AllowedValues and have to put in all values in the SuggestedValues. We kind of want to not allow users to be able to type anything but only select values from a list of pre-defined values.

Is it something possible?

Apr 15, 2010 at 6:52 PM

Not easily. the custom control is cannot be limited to allowed values because its appends multiple values together.. for example if the allowed values are:
[Vista]
[XP]
[7]

then the system will not accept "[Vista];[XP]" as an allowed value. That is why we provide the value list in the SuggestedValues and allow anything for that field. However you can do some validation in the custom control itself. I believe if you type in somthing that is not in the suggested values list, it will just get silently dropped. You can do more strict validation in the custom control itself in the FlushToDatasource call.

Hope this helps.