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

CommandBarDropDownList ReadOnly

1 Answer 116 Views
CommandBar
This is a migrated thread and some comments may be shown as answers.
MikeB
Top achievements
Rank 1
MikeB asked on 27 Apr 2012, 05:04 PM
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;
}

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 02 May 2012, 02:53 PM
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 >>
Tags
CommandBar
Asked by
MikeB
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or