This is a migrated thread and some comments may be shown as answers.

Event on user entry validation

7 Answers 130 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Filleau
Top achievements
Rank 1
Filleau asked on 17 Nov 2010, 07:00 AM
Hi,

I'm working in VB with 2010Q3 terik winform.

I have a RadDropDownList with some predefined items.
I wan't to give possibilty for users to enter their values if needed.

But I don't find how to trap when they have finished to enter the text.

The event IndexChanges fire only when they choose a predefined value
The event TextChange fire every time user press a key
The event SelectedValueChanged never fire !

I need to update my form when user choose a item from existing value or when user have finished to entered his own value.

Thanks for your help.

Anthony

7 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 17 Nov 2010, 11:21 AM
Hello,

How are you planning to allow user to add values? For exmaple, do you want to provide a separate textbox to allow users to add an item to your RadDropDownList or, directly to the RadDropDownList? If you can let me know, I'll do my best to help with something that fits your situation.

Thanks
Richard
0
Filleau
Top achievements
Rank 1
answered on 17 Nov 2010, 11:44 AM
User may type a value inside the RadDrolList.
0
Richard Slade
Top achievements
Rank 2
answered on 17 Nov 2010, 12:50 PM
Hello,

My apologies, but I'm not sure I understand how you wish to do this. A RadDropDownList in DropDown mode will initially allow you to type something. But once an item has been selected, then you only have the option as far as I'm aware to be able to edit each of the items in the list.

If you can include more information on how you intend to add items I can help.
Many thanks
Richard
0
Filleau
Top achievements
Rank 1
answered on 17 Nov 2010, 01:21 PM
Thank you for efforts. I do my best to speak English (I'm french)

Example: I want to make a treatment that returns information about a country. The user must select a country from a predefined list of the top 5 (U.S., CANADA, FRANCE, CHINA, BRAZIL) but must also be able to enter another;
If he selects an item who exists, I can trap the ItemChanged event and start the search.
If he types a country I like to know when it validates the input with Enter (because I don't want  to add a button to my form.)
I don't need to had the user value in the list. Because the list contains the most populars.
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 17 Nov 2010, 01:31 PM
Hello,

No problem. I'm sure your English is better than my French.

In my view, because of the nature of the RadDropDownList in DropDown mode, this may not suit your requirements because it allows editing of each of the items.

May I ask why you do not want a button on your form? In my view, buttons to perform actions are essential on any windows form where the user will confirm an action.

In my view, it would be better to provide a RadDropDownList of default options (RadDropDownList in DropDownList mode) and an additional RadTextBox for the addtional choice together with a confirm and cancel button.

I hope this helps, but if you need anything else, just let me know.
Regards,

Richard
0
Filleau
Top achievements
Rank 1
answered on 17 Nov 2010, 02:20 PM
OK

Thanks for your view. I think your solution is better.
I don't know why I don't wan't a button because if user have to press [enter] or click a button, it take the same time....

So I will do what you wrote.

Thanks again.
0
Richard Slade
Top achievements
Rank 2
answered on 17 Nov 2010, 02:23 PM
I'm pleased that was useful to you.
Best regards,

Richard
Tags
DropDownList
Asked by
Filleau
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Filleau
Top achievements
Rank 1
Share this question
or