Completed
Last Updated: 18 Oct 2016 09:26 by ADMIN
To reproduce: please refer to the attached gif file.

The error is not reproduced each time with the Demo application. Sometimes an unhandled exception dialog appears and sometimes the application becomes unresponsive and you can not close the application with upper right X, the options to the right does not respond, you can not change demo using the list on the left. Selecting "Settings" in Property Grid section and then clicking on a boolean property (left column), scrolling using the mouse wheel, then selecting another property (with PropertyGridDropDownListEditor) or clicking around in the application (even outside of the property grid form).

Workaround:   this.radPropertyGrid1.EditorRequired += radPropertyGrid1_EditorRequired;

private void radPropertyGrid1_EditorRequired(object sender, PropertyGridEditorRequiredEventArgs e)
{
    if (e.EditorType == typeof(PropertyGridDropDownListEditor))
    {
        e.Editor = new CustomPropertyGridDropDownListEditor();
    }
}

public class CustomPropertyGridDropDownListEditor : PropertyGridDropDownListEditor
{
    public override object Value
    {
        get
        {
            PropertyGridItemElement element = this.OwnerElement as PropertyGridItemElement;
            PropertyGridItem item = element.Data as PropertyGridItem;
            if (item == null)
            {
                return null;
            }
            return base.Value;
        }
        set
        {
            base.Value = value;
        }
    }
}
Completed
Last Updated: 12 Jan 2016 06:42 by ADMIN
To reproduce: use the following code snippet and refer to the attached gif file:

 public Form1()
 {
     InitializeComponent(); 
     this.radPropertyGrid1.SelectedObject = this;
 }

 private void radButton1_Click(object sender, EventArgs e)
 {
     ThemeResolutionService.ApplicationThemeName = "VisualStudio2012Dark";
 }

 private void radButton2_Click(object sender, EventArgs e)
 {
     ThemeResolutionService.ApplicationThemeName = "ControlDefault";
 }


Workaround:

private void radPropertyGrid1_EditorInitialized(object sender, PropertyGridItemEditorInitializedEventArgs e)
{
    PropertyGridTextBoxEditor editor = e.Editor as PropertyGridTextBoxEditor;
    if (editor != null)
    {
        BaseTextBoxEditorElement el = editor.EditorElement as BaseTextBoxEditorElement;
        if (el != null)
        {
            el.BackColor = Color.Black;
        }
    }
}
Completed
Last Updated: 03 Jul 2017 11:26 by ADMIN
Workaround use the attached custom theme: http://docs.telerik.com/devtools/winforms/themes/using-custom-themes
Completed
Last Updated: 20 Dec 2017 06:09 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Sr.
Comments: 0
Category: PropertyGrid
Type: Bug Report
3
To reproduce: use the following code snippet and follow the steps from the gif file:

            PropertyStoreItem item1 = new PropertyStoreItem(typeof(string), "Test1", "Test1");
            PropertyStoreItem item2 = new PropertyStoreItem(typeof(string), "Test2", "Test2");
          
            RadPropertyStore store = new RadPropertyStore();
            store.Add(item1);
            store.Add(item2); 
            this.radPropertyGrid1.SelectedObject = store;

            this.radPropertyGrid1.ToolbarVisible = true;

Workaround: close the editor programmatically when the search box gets focus.

this.radPropertyGrid1.PropertyGridElement.ToolbarElement.SearchTextBoxElement.TextBoxItem.GotFocus += TextBoxItem_GotFocus;

        private void TextBoxItem_GotFocus(object sender, EventArgs e)
        {
            this.radPropertyGrid1.EndEdit();
        }
Completed
Last Updated: 26 Nov 2018 11:28 by ADMIN
To reproduce: run the attached sample project and follow the steps from the gif file.

Workaround: cancel the edit operation when handling the MouseDown event of RadPropertyGrid:

        private void radPropertyGrid1_MouseDown(object sender, MouseEventArgs e)
        {
            var elementUnderMouse = this.radPropertyGrid1.ElementTree.GetElementAtPoint(e.Location).FindAncestor<RadScrollBarElement>();
            if (elementUnderMouse!=null)
            {
                this.radPropertyGrid1.CancelEdit();
            } 
        }
Completed
Last Updated: 28 Nov 2017 06:45 by ADMIN
Please refer to the attached video illustrating the incorrect behavior of the context menu.

Workaround:

        public RadForm1()
        {
            InitializeComponent();

            this.radPropertyGrid1.SelectedObject = this;
            this.radPropertyGrid1.ToolbarVisible = true;

            this.radPropertyGrid1.RadContextMenu = new CustomPropertyGridDefaultContextMenu(this.radPropertyGrid1.PropertyGridElement.PropertyTableElement);
        }

        public class CustomPropertyGridDefaultContextMenu : Telerik.WinControls.UI.PropertyGridDefaultContextMenu
        {
            PropertyGridTableElement tableElement;

            public CustomPropertyGridDefaultContextMenu(PropertyGridTableElement propertyGridElement) : base(propertyGridElement)
            {
                tableElement = propertyGridElement;
            }

            protected override void OnDropDownOpening(CancelEventArgs args)
            {
                base.OnDropDownOpening(args);
                PropertyGridItemBase item = this.tableElement.SelectedGridItem;
                if (item != null)
                {
                    if (!(item is PropertyGridGroupItem))
                    {
                        this.EditMenuItem.Visibility = ElementVisibility.Visible;
                        this.ResetMenuItem.Visibility = ElementVisibility.Visible;
                    }
                }
            }
        }
Completed
Last Updated: 21 Jun 2018 15:08 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Sr.
Comments: 2
Category: PropertyGrid
Type: Bug Report
2
To reproduce:

Public Class RadForm1
    Sub New()        
        InitializeComponent()
        RadPropertyGrid1.SelectedObject = New MyProperties
    End Sub

    Public Class MyProperties

        Private _height As Integer = 70
        <Browsable(True)> <Category("Rows")> <DisplayName("Height")> _
        <Description("Sets the height of the row. Range 70 to 200.")> _
        <RadRange(70, 200)> _
        Public Property Height() As Integer
            Get
                Return _height
            End Get
            Set(ByVal Value As Integer)
                _height = Value
            End Set
        End Property
    End Class
End Class

When you activate the editor you will notice that you are allowed to enter values outside the specified range 7-200.

Workaround:

AddHandler Me.RadPropertyGrid1.EditorInitialized, AddressOf PropertyGridEditorInitialized

    Private Sub PropertyGridEditorInitialized(sender As Object, e As PropertyGridItemEditorInitializedEventArgs)
        Dim spinEditor As PropertyGridSpinEditor = TryCast(e.Editor, PropertyGridSpinEditor)
        If spinEditor IsNot Nothing Then
            spinEditor.MinValue = 70
            spinEditor.MaxValue = 200
        End If

    End Sub
Completed
Last Updated: 07 Mar 2013 06:01 by ADMIN
To reproduce:
  public Form1()
        {
            InitializeComponent();

            PropertyStoreItem intItem = new PropertyStoreItem(typeof(int), "Integer", 1);
            PropertyStoreItem floatItem = new PropertyStoreItem(typeof(float), "Float", 1f, "Property storing a floating point value.");
            PropertyStoreItem stringItem = new PropertyStoreItem(typeof(string), "String", "telerik", "Property storing a string value", "Telerik");
            PropertyStoreItem dockItem = new PropertyStoreItem(typeof(DockStyle), "Dock", DockStyle.Top, "Property containing DockStyle value", "Layout", false);

            RadPropertyStore store = new RadPropertyStore();
            store.Add(intItem);
            store.Add(floatItem);
            store.Add(stringItem);
            store.Add(dockItem);

            this.radPropertyGrid1.SelectedObject = store;
        }

        private void radButton1_Click(object sender, EventArgs e)
        {
            PropertyStoreItem intItem = new PropertyStoreItem(typeof(int), "Integer111", 1);
            PropertyStoreItem floatItem = new PropertyStoreItem(typeof(float), "Float111", 1f, "Property storing a floating point value.111");
            PropertyStoreItem stringItem = new PropertyStoreItem(typeof(string), "String111", "telerik", "Property storing a string value", "Telerik111");
            PropertyStoreItem dockItem = new PropertyStoreItem(typeof(DockStyle), "Dock111", DockStyle.Top, "Property containing DockStyle value", "Layout111", false);

            RadPropertyStore store = new RadPropertyStore();
            store.Add(intItem);
            store.Add(floatItem);
            store.Add(stringItem);
            store.Add(dockItem);

            this.radPropertyGrid1.SelectedObject = store;

        }

WORKAOUND: 

radPropertyGrid1.PropertyGridElement.SplitElement.HelpElement.TitleText = "";
radPropertyGrid1.PropertyGridElement.SplitElement.HelpElement.ContentText = "";
Completed
Last Updated: 23 Apr 2013 05:45 by ADMIN
Steps to reproduce:
1. Add a RadPropertyGrid to a form
2. Set the SelectedObject property to an object with an enum property
3. Open the enum property for edit.
4. Click on another control that can take focus e.g. the form control box buttons
You will see that the editor remains open.
Completed
Last Updated: 20 Feb 2012 07:58 by ADMIN
1. Drag a new RadPropertyGrid to a form.
2. Set the selected object property to any object
3. Add an event handler for the PropertyValueChanged event and add code in it that sets the same object as selected object of the property grid.
4. You will get a NullReferenceException
Completed
Last Updated: 15 Feb 2014 11:03 by ADMIN
ADMIN
Created by: George
Comments: 1
Category: PropertyGrid
Type: Bug Report
2
To reproduce:

Follow this article http://www.telerik.com/help/winforms/propertygrid-features-custom-grouping.html . You will notice that the CustomGrouping event will not fire.
Completed
Last Updated: 28 Jun 2016 11:45 by ADMIN
Add a RadPropertyGrid and change its Dock property to Fill. Use the following code:

public partial class Form1 : Form
{
    RadPropertyStore _store;

    public Form1()
    {
        InitializeComponent();
        this.radPropertyGrid1.CreateItemElement += new CreatePropertyGridItemElementEventHandler(this.onCreateItemElement);
        _store = new RadPropertyStore();

        PropertyStoreItem barItem = new PropertyStoreItem(typeof(Int32), "TrackBar", 25);
        _store.Add(barItem);

        PropertyStoreItem sec = new PropertyStoreItem(typeof(bool), "Checkr", true);
        _store.Add(sec);

        this.radPropertyGrid1.SelectedObject = _store;
    }

    private void onCreateItemElement(object sender, CreatePropertyGridItemElementEventArgs e)
    {
        PropertyGridItem item = e.Item as PropertyGridItem;

        if (item != null)
        {
            if (item.Name == "TrackBar")
            {
                e.ItemElementType = typeof(TrackBarPropertyGridItem);
            }
        }
    }
}

public class TrackBarPropertyGridItem : PropertyGridItemElement
{
    protected override PropertyGridValueElement CreatePropertyGridValueElement()
    {
        return new CustomPropertyGridValueElement(); 
    }
}

public class CustomPropertyGridValueElement : PropertyGridValueElement
{
    RadTrackBarElement _trackbar;

    public RadTrackBarElement Trackbar
    {
        get
        {
            return this._trackbar;
        }
    }

    protected override void CreateChildElements()
    {
        base.CreateChildElements();

        _trackbar = new RadTrackBarElement();
        _trackbar.Minimum = 0;
        _trackbar.Maximum = 100;
       
        this.DrawText = false;
        this.Children.Add(_trackbar);
    }
}



When resizing the form, the applications hangs.

Workaround:

/// <summary>
    /// Track bar property grid element
    /// </summary>
    public class TrackBarPropertyGridItem : PropertyGridItemElement
    {
        class MyTrackBarElement : RadTrackBarElement
        {
            protected override void OnNotifyPropertyChanged(string propertyName)
            {
                if (propertyName == "TickOffSet" || propertyName == "ThumbSize")
                {
                    this.BodyElement.ScaleContainerElement.InvalidateMeasure();
                    this.BodyElement.IndicatorContainerElement.InvalidateMeasure();
                    return;
                }

                base.OnNotifyPropertyChanged(propertyName);
            }

            protected override Type ThemeEffectiveType
            {
                get
                {
                    return typeof(RadTrackBarElement);
                }
            }
        }

        /// <summary>
        /// The trackbar element to be displayed in the cell
        /// </summary>
        private RadTrackBarElement _trackbar;

        /// <summary>
        /// Accessor to the track bar element
        /// </summary>
        public RadTrackBarElement Trackbar
        {
            get { return _trackbar; }
        }

        /// <summary>
        /// Create child elements of the propertyGridItem
        /// </summary>
        protected override void CreateChildElements()
        {
            base.CreateChildElements();

            _trackbar = new MyTrackBarElement();
            _trackbar.Minimum = 0;
            _trackbar.Maximum = 100;
            _trackbar.ShowTicks = false;


            this.ValueElement.DrawText = false;
            this.ValueElement.Children.Add(this._trackbar);
        }

        /// <summary>
        /// Synchronise the value with property grid item
        /// </summary>
        public override void Synchronize()
        {
            base.Synchronize();

            PropertyGridItem item = this.Data as PropertyGridItem;

            this._trackbar.Value = (int)item.Value;
        }


        /// <summary>
        /// Add editor override
        /// </summary>
        /// <param name="editor">input editor</param>
        public override void AddEditor(IInputEditor editor)
        { }

        /// <summary>
        /// Remove editor override
        /// </summary>
        /// <param name="editor">input editor</param>
        public override void RemoveEditor(IInputEditor editor)
        { }

        /// <summary>
        /// Check if the item is comptable with trackbar editor
        /// </summary>
        /// <param name="data">item to check</param>
        /// <param name="context">context</param>
        /// <returns>true if compatible, false otherwise</returns>
        public override bool IsCompatible(PropertyGridItemBase data, object context)
        {
            PropertyGridItem item = data as PropertyGridItem;
            return (item != null && item.PropertyType == typeof(int));
        }

        /// <summary>
        /// Get the type of the property grid element
        /// </summary>
        protected override Type ThemeEffectiveType
        {
            get { return typeof(PropertyGridItemElement); }
        }
Completed
Last Updated: 31 Mar 2014 10:21 by ADMIN
To reproduce: -add a RadPropertyGrid and use the following code: radPropertyGrid.SelectedObject = new MyPropertyGridAdapter(node); PropertyValueChanging += new PropertyGridItemValueChangingEventHandler(OnPropertyValueChanging); private void OnPropertyValueChanging(object sender, PropertyGridItemValueChangingEventArgs e) { var form = new CommentActionForm(); if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK) { var item = e.Item as PropertyGridItem; var pd = item.PropertyDescriptor as MyPropertyDescriptor; if (pd != null) { // Perform value change (affects database). } } else { e.Cancel = true; } } Workaround:when ending edit mode with Enter key you may use the following approach: public Form1() { InitializeComponent(); this.radPropertyGrid1.SelectedObject = new MyObject(10204, "Sample name", "Some descripion"); this.radPropertyGrid1.EditorRequired += radPropertyGrid1_EditorRequired; } private void radPropertyGrid1_EditorRequired(object sender, PropertyGridEditorRequiredEventArgs e) { PropertyGridItem propertyItem = e.Item as PropertyGridItem; e.Editor = new MyEditor(propertyItem); } public class MyObject { public int ID { get; set; } public string Name { get; set; } public string Description { get; set; } public MyObject(int iD, string name, string description) { this.ID = iD; this.Name = name; this.Description = description; } } public class MyEditor : PropertyGridTextBoxEditor { public string InitialValue { get; set; } public PropertyGridItem PropertyItem { get; set; } public MyEditor(PropertyGridItem item) : base() { this.PropertyItem = item; } public override void BeginEdit() { InitialValue = this.TextBoxEditorElement.Text; base.BeginEdit(); } } public class MyPropertyGrid : RadPropertyGrid { protected override bool ProcessDialogKey(Keys keyData) { if (this.ActiveEditor != null && this.ActiveEditor is MyEditor && keyData == Keys.Enter) { MyEditor editor = ((MyEditor)this.ActiveEditor); PropertyGridItem property = editor.PropertyItem; string initialValue = editor.InitialValue; DialogResult ds = RadMessageBox.Show("Are you sure?", "Title", MessageBoxButtons.OKCancel, RadMessageIcon.Question); if (ds == System.Windows.Forms.DialogResult.Cancel) { property.Value = initialValue; return false; } } return base.ProcessDialogKey(keyData); } }
Completed
Last Updated: 15 May 2012 04:36 by ADMIN
FIX. RadPropertyGrid - setting the SelectedObject to something and then set it to a property store, does not remove the initial items

Workaround: clear the items prior setting the property store:
        this.radPropertyGrid1.PropertyGridElement.PropertyTableElement.ListSource.Clear();
Completed
Last Updated: 25 Dec 2014 14:46 by ADMIN
To reproduce:
- Add a property grid to a blank form set the selected object the the same form.
- Group the items and click several times to expand collapse the groups or items.
- you will notice that some of expanded/collapsed groups icon is in wrong state (same applies for the +/- sign of the properties).
Completed
Last Updated: 13 Nov 2014 12:15 by ADMIN
To reproduce: use the following code:

Items _items = new Items();

public Form1()
{
    InitializeComponent(); 

    radPropertyGrid1.SelectedObject = _items;
}

class Items
{
    [Description("A Bool Property")]
    public bool IsEnabled
    {
        get
        {
            return _isEnabled;
        }
        set
        {
            _isEnabled = value;
            RadMessageBox.Show("IsEnabled");
        }
    }
    private bool _isEnabled;

    [Description("A String Property")]
    public string Name
    {
        get { return _name; }
        set
        {
            _name = value;
            RadMessageBox.Show("Name");
        }
    }
    private string _name ;

}

Steps to perform:
1. Change the "Name" property and leave the editor active.
2. Click on the check box to change the "IsEnabled" property.

As a result you will notice that the "IsEnabled" setter is called before the "Name" setter.

Workaround:

Items _items = new Items();

public Form1()
{
    InitializeComponent(); 

    this.radPropertyGrid1.CreateItemElement += radPropertyGrid1_CreateItemElement;        
    radPropertyGrid1.SelectedObject = _items;
}

private void radPropertyGrid1_CreateItemElement(object sender, CreatePropertyGridItemElementEventArgs e)
{
    if (e.ItemElementType == typeof(PropertyGridCheckBoxItemElement))
    {
        e.ItemElementType = typeof(CustomPropertyGridCheckBoxItemElement);
    }
}

public class CustomPropertyGridCheckBoxItemElement : PropertyGridCheckBoxItemElement
{
    public CustomPropertyGridCheckBoxItemElement()
    {
        this.CheckBoxElement.ToggleStateChanging += CheckBoxElement_ToggleStateChanging;
    }

    private void CheckBoxElement_ToggleStateChanging(object sender, StateChangingEventArgs args)
    {
        if (this.PropertyTableElement.ActiveEditor != null && this.PropertyTableElement.SelectedGridItem != this.Data)
        {
            this.PropertyTableElement.EndEdit();
        }
    }

    protected override void DisposeManagedResources()
    {
        this.CheckBoxElement.ToggleStateChanging -= CheckBoxElement_ToggleStateChanging;

        base.DisposeManagedResources();
    }
}
Completed
Last Updated: 14 Feb 2013 07:37 by ADMIN
Steps to reproduce:
1. Create a custom type descriptor for an object that returns less properties than the default one.
2. Set this descriptor to the object
3. Set an object array containing two such objects to the SelectedObjects property of RadPropertyGrid
4. Run the project and you will see all properties of the object are shown disrespecting the custom type descriptor.
Completed
Last Updated: 15 Feb 2013 01:50 by ADMIN
Currently RadPropertyGrid uses CurrentUICulture for localization, while it should use CurrentCulture.
Completed
Last Updated: 04 Feb 2013 07:14 by ADMIN
Steps to reproduce:
1. Set a PasswordPropertyText(true) attribute to a string property of an object.
2. Set the object as selected of a property grid.
3. Open the password property for edit.
Any other text property you try to edit will be handled as if it was password.
Completed
Last Updated: 25 Oct 2013 06:11 by ADMIN
To reproduce:
- Click on a property (with a dropdown editor for example) to start edit.
- Move mouse over vertical center dividing line to get mouse to transition to resize pointer.
- Move mouse to the right back over the combo box that has been activated for edit.
- The mouse pointer will not transition back to the arrow, it will stay on the resize pointer.
1 2 3 4