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
2549
UltraGrid, ValueList, Autocomplete causes FormatException
posted

Hi all,
I have an UltraGrid bound to a view. It is basically a mapping between a string and an int value so I have two visible columns.
For the int column I added a ValueList which I the attached to the column.

If I run the project the ValueList is shown, I can type (autocomplete) so it seems quite fine.

Unfortunately if I type something that does not exist in the ValueList I receive a FormatException.

I have set the Style of the column to DropDownValidate, assuming that this would fix it, but it didn't.

I know that I can set it to DropDownList, but I want the users to type more than one character for the autocompletion.

I also tried the BeforeExitEditMode event, but as expected the typing of the character itself causes the ValueList to fail (because the value does not exist).

How can I work around this? I want the user to type more than one character for the autocompletion and if he/she entered something invalid prompt the user with some options and not allow the cell to be left until this is done.

Any help is kindly appreciated,

best regards

Andy