Event on user entry validation

8 posts, 1 answers
  1. Filleau
    Filleau avatar
    114 posts
    Member since:
    Jun 2006

    Posted 17 Nov 2010 Link to this post

    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
  2. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 17 Nov 2010 Link to this post

    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
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Filleau
    Filleau avatar
    114 posts
    Member since:
    Jun 2006

    Posted 17 Nov 2010 Link to this post

    User may type a value inside the RadDrolList.
  5. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 17 Nov 2010 Link to this post

    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
  6. Filleau
    Filleau avatar
    114 posts
    Member since:
    Jun 2006

    Posted 17 Nov 2010 Link to this post

    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.
  7. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 17 Nov 2010 Link to this post

    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
  8. Filleau
    Filleau avatar
    114 posts
    Member since:
    Jun 2006

    Posted 17 Nov 2010 Link to this post

    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.
  9. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 17 Nov 2010 Link to this post

    I'm pleased that was useful to you.
    Best regards,

    Richard
Back to Top
UI for WinForms is Visual Studio 2017 Ready