Valid entry issue

2 posts, 1 answers
  1. Phil H.
    Phil H. avatar
    88 posts
    Member since:
    Nov 2008

    Posted 01 Oct 2014 Link to this post


    We are working with some existing code.  The RadDropDownList controls throughout the application allows any data entry in the control (for example: a list of USA states, I could enter Fred and tab out of the field).  Currently, all RadDropDownList controls DropDownStyle are set to DropDown.  What are the best practices constraining the users data entry to the supplied list.

  2. Answer
    Dimitar avatar
    2983 posts

    Posted 06 Oct 2014 Link to this post

    Hi Phil,

    Thank you for writing.

    In order to make the text area of the RadDropDownList read-only you should just set the DropDownStyle property to DropDownList. This way the user will not be able to edit the text and he/she should chose from one of the predefined options.

    If you do not want to change the drop down style for some reason, you can use the Validating event and cancel the change and perhaps display a message to the user.

    I hope this helps. Let me know if you have additional questions.

    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
Back to Top