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

Property Grid Combo Editor Changes the selected value when you double click to start edit

1 Answer 112 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Randy
Top achievements
Rank 1
Randy asked on 18 Jul 2013, 02:26 PM
If a property grid combo editor is double clicked to start an edit the value will cycle through the available values.

Here is a really simple code example for this.  If you just double click to start the edit on the MyEnum field you will notice that the value will keep changing every time you start the edit.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
 
namespace PropertyGridTest
{
    public partial class Form1 : Form
    {
        MyObject theObject = new MyObject();
 
        public Form1()
        {
            InitializeComponent();
 
            theObject.MyEnum = MyEnum.One;
            theObject.Name = "test";
            radPropertyGrid1.SelectedObject = theObject;
        }
    }
 
    public enum MyEnum { One, Two, Three, Four, Five };
 
    public class MyObject
    {
        public string Name { get; set; }
        public MyEnum MyEnum { get; set; }
 
        public MyObject() { }
    }
}

1 Answer, 1 is accepted

Sort by
0
George
Telerik team
answered on 23 Jul 2013, 02:00 PM
Hi Randy,

Thank you for writing.

This is a desired behavior for RadPropertyGrid, a feature our users demand. In addition this is how the Microsoft PropertyGrid works as well.

However for your convenience, we will add option which allows you to turn this feature off - a property called LoopValuesOnDoubleClick in PropertyGridDropDownListEditor. I have added a feature request in our Public Issue Tracking System. We will try to add this for the upcomming Service Pack. You can track its changes on the following url: http://www.telerik.com/support/pits.aspx#/public/winforms/15419.

Additionally I have updated your Telerik Points for the request.

If you have any other questions or comments, please let me know.
 
Regards,
George
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
PropertyGrid
Asked by
Randy
Top achievements
Rank 1
Answers by
George
Telerik team
Share this question
or