When I moving the tab order to the dropdown the content is not getting highlighted. I used the property style is Dropdownlist.is there any method to highlight the . PFA
6 Answers, 1 is accepted
0
Hello, Suganya,
When the RadDropDownList.DropDownStyle property is set to DropDownList there is no text box which text to be selected. That is why in this case the full text selection is not available. If you need it, feel free to set the DropDownStyle property to DropDown. Note that you can prevent editing the text box in this case by setting the DropDownListElement.TextBox.TextBoxItem.TextBoxControl.ReadOnly property to true.
I hope this information helps. If you need any further assistance please don't hesitate to contact me.
Regards,
Dess
Progress Telerik
When the RadDropDownList.DropDownStyle property is set to DropDownList there is no text box which text to be selected. That is why in this case the full text selection is not available. If you need it, feel free to set the DropDownStyle property to DropDown. Note that you can prevent editing the text box in this case by setting the DropDownListElement.TextBox.TextBoxItem.TextBoxControl.ReadOnly property to true.
I hope this information helps. If you need any further assistance please don't hesitate to contact me.
Regards,
Dess
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Suganya
Top achievements
Rank 1
answered on 29 Sep 2018, 10:38 AM
Hi, Dess,
Thank you for your reply.i have applied the Changes in Our Application Only the option is working but the content is not getting focused. Please help me with other solution
Thank you for your reply.i have applied the Changes in Our Application Only the option is working but the content is not getting focused. Please help me with other solution
0
Hello Suganya,
If you will be setting the ReadOnly property to false it is not necessary to set the DropDownStyle property of the control. All you need to do is this:
Alternatively, you can also consider showing the focus cues and leaving the DropDownStyle property set to DropDown, this way you will have a visual indication when the drop-down receives the focus, yet the text will not get selected:
I am also attaching a short video showing the result on my end.
Regards,
Hristo
Progress Telerik
If you will be setting the ReadOnly property to false it is not necessary to set the DropDownStyle property of the control. All you need to do is this:
this
.radDropDownList1.DropDownListElement.TextBox.TextBoxItem.TextBoxControl.ReadOnly =
true
;
Alternatively, you can also consider showing the focus cues and leaving the DropDownStyle property set to DropDown, this way you will have a visual indication when the drop-down receives the focus, yet the text will not get selected:
this
.radDropDownList1.AllowShowFocusCues =
true
;
this
.radDropDownList1.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
I am also attaching a short video showing the result on my end.
Regards,
Hristo
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Suganya
Top achievements
Rank 1
answered on 03 Oct 2018, 08:40 AM
Hi Hristo,
Thank You for your reply. I Applied the condition into dropdown its working fine. how to set the content color for focusing the . I have applied some property but nothing has changed. can you please share me the property if anything is applicable. I have attached the Image Link for your reference.
reference image: http://prntscr.com/l1l5o8
Thank You for your reply. I Applied the condition into dropdown its working fine. how to set the content color for focusing the . I have applied some property but nothing has changed. can you please share me the property if anything is applicable. I have attached the Image Link for your reference.
reference image: http://prntscr.com/l1l5o8
0
Hello Suganya,
In order to change the back color of the text box, you will need to access the editable element. This back color is also defined in themes and setting it locally will override the values defined for other element states. In this respect, it will be necessary to set it using the ThemeValueOverride API: https://docs.telerik.com/devtools/winforms/telerik-presentation-framework/override-theme-settings-at-run-time. Please check my code snippet below:
I am also attaching a short video showing the result on my end.
Regards,
Hristo
Progress Telerik
In order to change the back color of the text box, you will need to access the editable element. This back color is also defined in themes and setting it locally will override the values defined for other element states. In this respect, it will be necessary to set it using the ThemeValueOverride API: https://docs.telerik.com/devtools/winforms/telerik-presentation-framework/override-theme-settings-at-run-time. Please check my code snippet below:
public
partial
class
RadForm1 : Telerik.WinControls.UI.RadForm
{
public
RadForm1()
{
InitializeComponent();
this
.radDropDownList1.AllowShowFocusCues =
true
;
this
.radDropDownList1.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
this
.radDropDownList1.GotFocus += RadDropDownList1_GotFocus;
this
.radDropDownList1.LostFocus += RadDropDownList1_LostFocus;
}
private
void
RadDropDownList1_LostFocus(
object
sender, EventArgs e)
{
this
.radDropDownList1.DropDownListElement.EditableElement.ResetThemeValueOverrides();
}
private
void
RadDropDownList1_GotFocus(
object
sender, EventArgs e)
{
this
.radDropDownList1.DropDownListElement.EditableElement.SetThemeValueOverride(RadItem.BackColorProperty, Color.FromArgb(51, 153, 255),
"RadDropDownListEditableAreaElement"
);
this
.radDropDownList1.DropDownListElement.EditableElement.SetThemeValueOverride(RadItem.ForeColorProperty, Color.White,
"RadDropDownListEditableAreaElement"
);
}
}
I am also attaching a short video showing the result on my end.
Regards,
Hristo
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Suganya
Top achievements
Rank 1
answered on 18 Oct 2018, 02:22 PM
Thanks for your timely support