CommandBarDropDownList ReadOnly

2 posts, 0 answers
  1. MikeB
    MikeB avatar
    42 posts
    Member since:
    May 2008

    Posted 27 Apr 2012 Link to this post

    Hi,
    Does anyone know how to set the TextBox, TextBoxItem, EditControl or what ever property to read only so that the users can not type any text into it?  I've tried every sub control that has a read only property I could find.  Maybe I missed the correct one.

    Thanks,

    Mike

    edit:

    Still can not find it but accomplished with the KeyDown Event Handler
    {
       e.SuppressKeyPress = true;
    
       e.Handled = true;
    
    }
  2. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 02 May 2012 Link to this post

    Hi Michael,

    Thank you for writing.

    In order to prevent the user from typing in the editable area, simply set the DropDownStyle of CommandBarDropDownList to DropDownList:
    commandBarDropDownList1.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;

    I hope this helps. Let us know if you have any other questions.

    Regards,
    Stefan
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top