RadDropDownList ReadOnly not working with SelectNextOnDoubleClick

4 posts, 0 answers
  1. Francois
    Francois avatar
    52 posts
    Member since:
    Dec 2010

    Posted 11 Mar 2014 Link to this post

    If SelectNextOnDoubleClick is enabled, even if the control is set to ReadOnly = true, you can change the value by double clicking on the control.

    The only workaround seems to disable the setting...
  2. Francois
    Francois avatar
    52 posts
    Member since:
    Dec 2010

    Posted 11 Mar 2014 in reply to Francois Link to this post

    Also :

    You can select a value using the keyboard when DropDownStyle = DropDownList by typing the first letter of the item.

    You can select a value using the mouse wheel when DropDownStyle = DropDown by scrolling the mouse wheel in the item.


    Did you put an intern on that functionnality? lol
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Francois
    Francois avatar
    52 posts
    Member since:
    Dec 2010

    Posted 11 Mar 2014 Link to this post

    Sorry to spam the thread, but here's what I'll be using until the behavior is fixed : 

    public static void SetReadOnly(this RadDropDownList ddl, bool readOnly)
    {
        ddl.ReadOnly = readOnly;
     
        // If not disabled, user can change the value
        ddl.SelectNextOnDoubleClick = !readOnly;
     
        if (ddl.DropDownStyle == RadDropDownStyle.DropDown)
        {
            // User can change the value by scrolling on the control
            ddl.EnableMouseWheel = !readOnly;
        }
        else if (ddl.DropDownStyle == RadDropDownStyle.DropDownList)
        {
            // User can select an item by typing the first caracter of an item
            ddl.DropDownListElement.ListElement.KeyboardSearchEnabled = !readOnly;
        }
     
        // Indicate to the user the state of the control
        if (readOnly)
        {
        /
            ddl.DropDownListElement.ArrowButton.Fill.BackColor2 = Color.FromArgb(175, 175, 175);
            ddl.DropDownListElement.ArrowButton.Fill.BackColor = Color.FromArgb(210, 210, 210);
        }
        else
        {
            ddl.DropDownListElement.ArrowButton.Fill.ResetValue(FillPrimitive.BackColorProperty, ValueResetFlags.Local);
            ddl.DropDownListElement.ArrowButton.Fill.ResetValue(FillPrimitive.BackColor2Property, ValueResetFlags.Local);
        }
    }




  5. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 14 Mar 2014 Link to this post

    Hi Francois,

    Thank you for reporting these cases.

    We tried to make sure this functionality on a way that our users are still able to change the SelectedIndex via code, hence these cases were omitted. I have logged this and we will resolve it for the next release. Here is a link to the item: http://feedback.telerik.com/Project/154/Feedback/Details/122934

    You Telerik Points have been updated for this report.

    You already have a work around that you can work with.

    Regards,
    Stefan
    Telerik
     

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

     
Back to Top