Full Select Dropdown list

7 posts, 0 answers
  1. Suganya
    Suganya avatar
    9 posts
    Member since:
    Sep 2018

    Posted 26 Sep 2018 Link to this post

    When I moving the tab order to the dropdown the content is not getting highlighted. I used the property dropdown style is Dropdownlist.is there any method to highlight the dropdown. PFA
  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3957 posts

    Posted 28 Sep 2018 Link to this post

    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
    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.
  3. Suganya
    Suganya avatar
    9 posts
    Member since:
    Sep 2018

    Posted 29 Sep 2018 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Hi, Dess,
       Thank you for your reply.i have applied the Changes in Our Application Only the Readonly option is working but the dropdown content is not getting focused. Please help me with other solution
  4. Hristo
    Admin
    Hristo avatar
    1520 posts

    Posted 01 Oct 2018 Link to this post

    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: 
    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.
  5. Suganya
    Suganya avatar
    9 posts
    Member since:
    Sep 2018

    Posted 03 Oct 2018 in reply to Hristo Link to this post

    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 dropdown. 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
  6. Hristo
    Admin
    Hristo avatar
    1520 posts

    Posted 03 Oct 2018 Link to this post

    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: 
    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.
  7. Suganya
    Suganya avatar
    9 posts
    Member since:
    Sep 2018

    Posted 18 Oct 2018 in reply to Hristo Link to this post

    Thanks for your timely support

     

Back to Top