Completed
Last Updated: 10 Oct 2018 10:07 by Dimitar
Use the editor from the following article to reproduce: https://docs.telerik.com/devtools/winforms/propertygrid/editors/using-custom-editor

Workaround:
void TrackBarEditor_ValueChanged(object sender, EventArgs e)
{
    PropertyGridItemElement owner = this.OwnerElement as PropertyGridItemElement;

    if (owner != null)
    {
        var method = owner.PropertyTableElement.GetType().GetMethod("OnValueChanged", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
        method.Invoke(owner.PropertyTableElement, new object[] { this, EventArgs.Empty });

    }
}
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: 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: 01 Jun 2018 11:57 by Dimitar
How to reproduce: associate the control with an object having a Font property. It can be the form itself, then try and change the font-size, e.g: -1.

The standard property grid displays a message box with the error.

Workaround handle the RadPropertyGrid.EditorInitialized event:
private void RadPropertyGrid_EditorInitialized(object sender, PropertyGridItemEditorInitializedEventArgs e)
{
    PropertyGridSpinEditor editor = e.Editor as PropertyGridSpinEditor;
    if (editor != null && e.Item.Parent != null && e.Item.Parent.Name == "Font" && e.Item.Name == "Size")
    {
        editor.MinValue = 1;
    }
}

Completed
Last Updated: 05 Jun 2018 11:26 by Dimitar
To reproduce:

            this.radPropertyGrid1.SelectedObject = this;             
            this.radPropertyGrid1.PropertyGridElement.SplitElement.HelpElement.MinSize = new Size(0, 60);

Please refer to the attached gif file.

Workaround:

            this.radPropertyGrid1.SelectedObject = this;             
            this.radPropertyGrid1.PropertyGridElement.SplitElement.HelpElement.MinSize = new Size(0, 60);
            this.radPropertyGrid1.PropertyGridElement.SplitElement.HelpElement.HelpTitleElement.MinSize = new Size(0,20);

            this.radPropertyGrid1.PropertyGridElement.SplitElement.HelpElement.HelpTitleElement.PropertyChanged += HelpTitleElement_PropertyChanged;

        private void HelpTitleElement_PropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            if (e.PropertyName == "Bounds")
            {
                if (this.radPropertyGrid1.PropertyGridElement.SplitElement.HelpElement.HelpContentElement.Location.Y != 20)
                {
                    this.radPropertyGrid1.PropertyGridElement.SplitElement.HelpElement.HelpContentElement.Location = new Point(0, 20);
                }
            }
        }

Note: the description element may be floating but it doesn't overlap the title. 
Completed
Last Updated: 21 Jun 2018 14:41 by ADMIN
Use attached to reproduce. 

Workaround
radPropertyGrid1.ItemSpacing = 1;
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: 28 Nov 2017 06:37 by ADMIN
How to reproduce: check the attached screenshot

Workaround: use the attached custom theme
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: 26 Sep 2017 13:12 by ADMIN
To reproduce:
- Add RadPropertyGrid to a form and set the theme to MaterialTeal. The issue is observed in the ThemeViewer as well.

Workaround:
radPropertyGrid1.PropertyGridElement.ToolbarElement.AlphabeticalToggleButton.TextWrap = true;
radPropertyGrid1.PropertyGridElement.ToolbarElement.CategorizedToggleButton.TextWrap = true;
//or

 radPropertyGrid1.PropertyGridElement.ToolbarElementHeight = 68;
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: 02 Jun 2017 11:40 by ADMIN
Use attached project to reproduce!
This works fine in  2016.2.608.

Workaround:
Use singe RadPropertyStore object instead of an array.
Completed
Last Updated: 15 Aug 2017 10:28 by ADMIN
To reproduce: please refer to the attached sample project. Try to select a new value from the drop-down editor and press Yes from the message box.

Workaround: use the RadPropertyGrid.PropertyValueChanging event to confirm the property changing: 

private void radPropertyGrid1_PropertyValueChanging(object sender, Telerik.WinControls.UI.PropertyGridItemValueChangingEventArgs e)
{
    e.Cancel = (MessageBox.Show("Are you sure you want to change this?", "Question", MessageBoxButtons.YesNo) != DialogResult.Yes);
}
Completed
Last Updated: 19 Jun 2017 12:06 by ADMIN
Please refer to the attached sample project.
Completed
Last Updated: 19 Jun 2017 11:49 by ADMIN
Please refer to the attached gif file demonstrating how to reproduce the error with the Demo application.

Workaround: change the DropDownStyle property to DropDownList:

private void radPropertyGrid1_EditorInitialized(object sender, PropertyGridItemEditorInitializedEventArgs e)
{
    PropertyGridDropDownListEditor editor = e.Editor as PropertyGridDropDownListEditor;
    if (editor!=null)
    {
        BaseDropDownListEditorElement editorElement = editor.EditorElement as BaseDropDownListEditorElement;
        editorElement.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
    }
}

Completed
Last Updated: 03 Jan 2017 14:54 by ADMIN
To reproduce:
public Form1()
{
    InitializeComponent();
    this.radPropertyGrid1.Size = new System.Drawing.Size(272, 135);
    PropertyStoreItem intItem = new PropertyStoreItem(typeof(int), "Integer", 1);
    PropertyStoreItem showTrend = new PropertyStoreItem(typeof(bool), "ShowTrend", 0);
    PropertyStoreItem trendItem1 = new PropertyStoreItem(typeof(int), "TrendTypes", 0);
    // Case of Re-loading the previously Saved Trend Type
    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(showTrend);
    store.Add(trendItem1);
    store.Add(floatItem);
    store.Add(stringItem);
    store.Add(dockItem);
    this.radPropertyGrid1.SelectedObject = store;
   radPropertyGrid1.Items["TrendTypes"].Visible = false;
    this.radPropertyGrid1.PropertyValueChanged += radPropertyGrid1_ValueChanged;

}

private void radPropertyGrid1_ValueChanged(object sender, PropertyGridItemValueChangedEventArgs e)
{

    PropertyGridItem current = (PropertyGridItem)e.Item;
    if (current.Name == "ShowTrend")
    {
        bool val = Convert.ToBoolean(current.Value);
        radPropertyGrid1.Items["TrendTypes"].Visible = val;
    }

}

- There is no scrollbar when the item is shown.

Workaround:
radPropertyGrid1.PropertyGridElement.PropertyTableElement.Update(PropertyGridTableElement.UpdateActions.ExpandedChanged);

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: 03 Jul 2017 11:25 by ADMIN
To reproduce: subscribe to the RadPropertyGrid.PropertyValidating event and apply ErrorMessage in some cases. If the validation fails, the error indicator is not visible in Windows8, VisualStudio2012Dark, Aqua. However, the error message is displayed as expected.

Workaround: assign an image for the ErrorIndicator

private void radPropertyGrid1_ItemFormatting(object sender, PropertyGridItemFormattingEventArgs e)
{
    PropertyGridItemElement itemElement = e.VisualElement as PropertyGridItemElement;
    if (itemElement != null)
    {
        ((PropertyGridTextElement)itemElement.TextElement).ErrorIndicator.Image = Properties.Resources.error;
    }
}
Completed
Last Updated: 10 Feb 2016 15:41 by ADMIN
Completed
Last Updated: 05 Feb 2016 07:07 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Sr.
Comments: 0
Category: PropertyGrid
Type: Bug Report
1
To reproduce: use the following code snippet and refer to the attached gif file.

public Form1()
{
    InitializeComponent();
    this.radPropertyGrid1.SelectedObject = this;
    this.radPropertyGrid1.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
}

Workaround:

public Form1()
{
    InitializeComponent();
    this.radPropertyGrid1.CreateItemElement += radPropertyGrid1_CreateItemElement;
    this.radPropertyGrid1.SelectedObject = this;
    this.radPropertyGrid1.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
}

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

public class CustomPropertyGridItemElement : PropertyGridItemElement
{
    private bool isResizing;
    private Point downLocation;
    private int downWidth;

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

    private const int resizePointerOffset = 3;

    public override bool IsInResizeLocation(Point location)
    {
        return (location.X >= this.ControlBoundingRectangle.X + this.PropertyTableElement.ValueColumnWidth - resizePointerOffset &&
                location.X <= this.ControlBoundingRectangle.X + this.PropertyTableElement.ValueColumnWidth + resizePointerOffset);
    }

    protected override void OnMouseDown(MouseEventArgs e)
    {
        if (IsInResizeLocation(e.Location))
        {
            if (this.PropertyTableElement.IsEditing)
            {
                this.PropertyTableElement.EndEdit();
            }

            this.Capture = true;
            this.isResizing = true;
            this.downLocation = e.Location;
            this.downWidth = this.PropertyTableElement.ValueColumnWidth;
        }

        base.OnMouseDown(e);
    }

    protected override void OnMouseMove(MouseEventArgs e)
    {
        if (this.isResizing)
        {
            int delta = e.Location.X - downLocation.X;

            if (this.RightToLeft)
            {
                delta *= -1;
            }

            this.PropertyTableElement.ValueColumnWidth = downWidth - delta;
            return;
        }

        if (this.IsInResizeLocation(e.Location))
        {
            this.ElementTree.Control.Cursor = Cursors.VSplit;
        }
        else
        {
            this.ElementTree.Control.Cursor = Cursors.Default;
        }

        base.OnMouseMove(e);
    }

    protected override void OnMouseUp(MouseEventArgs e)
    {
        if (this.isResizing)
        {
            this.isResizing = false;
            this.Capture = false;
        }

        base.OnMouseUp(e);
    }
}
1 2 3 4