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 });

    }
}
Declined
Last Updated: 30 Nov 2020 14:43 by ADMIN
Created by: Yusi
Comments: 4
Category: PropertyGrid
Type: Bug Report
0

Problem: I'd like to filter the properties to be displayed by their category names defined by the Category attribute. Based on the doc here (https://docs.telerik.com/devtools/winforms/controls/propertygrid/features/filtering), my understanding is to add a FilterDescriptor like this: New FilterDescriptor ("Category", FilterOperator.Contains, "some category name"). But it turned out to only filter by property name, not category name. Any misunderstanding or possible issue? Thank you for looking into this.

Reproduce:

1. Define a class like this:

    Private Class TestClass
        <Category("Cat1")> Public Property Property1 As Integer = 1
        <Category("Cat1")> Public Property Property2 As String = "Test 2"
        <Category("Cat2")> Public Property Property3 As String = "Test 3"
    End Class

2. Initialize a RadPropertyGrid in the Form.Load event:

        Dim testObj As New TestClass
        RadPropertyGrid1.EnableFiltering = True
        Dim filter As New FilterDescriptor("Category", FilterOperator.Contains, "2")
        RadPropertyGrid1.FilterDescriptors.Add(filter)
        RadPropertyGrid1.SelectedObject = testObj

3. The right property to be displayed should be Property3, but it turned out to be Property2

 

Example project: attached.

Thank you team!

 

Declined
Last Updated: 17 Aug 2020 14:27 by ADMIN

1. Create a custom property item

2. Enable grouping

3.Scroll up and down

4.NullReferenceException occurs

Unplanned
Last Updated: 16 Oct 2020 11:01 by ADMIN

Use the following code snippet and try to edit the Height. You will notice that the sub-items' order is changed:

            RadPropertyStore store = new RadPropertyStore();
            PropertyStoreItem sizeItem = new PropertyStoreItem(typeof(System.Drawing.Size), "Size", new System.Drawing.Size(100, 25), "The size of the control in pixels.", "Layout");
            store.Add(sizeItem);

            this.radPropertyGrid1.SelectedObject = store;
            this.radPropertyGrid1.SortOrder = SortOrder.Ascending;
            this.radPropertyGrid1.PropertySort = PropertySort.Alphabetical;

Unplanned
Last Updated: 24 Jan 2021 20:59 by Luca

The clients needs to use a PropertyGridDropDownListEditor and confirms the new value whenever a new selection is made. The attached gif file illustrates how to replicate the error using the following code snippet:

        public RadForm1()
        {
            InitializeComponent();

            this.radPropertyGrid1.SelectedObject = this; 
            this.radPropertyGrid1.EditorInitialized += radPropertyGrid1_EditorInitialized; 
        } 

        private void radPropertyGrid1_EditorInitialized(object sender, PropertyGridItemEditorInitializedEventArgs e)
        {
            PropertyGridDropDownListEditor ddl = e.Editor as PropertyGridDropDownListEditor;
            if (ddl != null)
            {
                ddl.LoopValuesOnDoubleClick = false;
                BaseDropDownListEditorElement element = ddl.EditorElement as BaseDropDownListEditorElement;

                if (element != null)
                { 
                    element.SelectedValueChanged -= Element_SelectedValueChanged;
                    element.SelectedValueChanged += Element_SelectedValueChanged;
                }
            }
        }
 
        private void Element_SelectedValueChanged(object sender, Telerik.WinControls.UI.Data.ValueChangedEventArgs e)
        {
            this.radPropertyGrid1.EndEdit();
        }

Workaround:

        public RadForm1()
        {
            InitializeComponent();

            this.radPropertyGrid1.SelectedObject = this;  

            this.radPropertyGrid1.ValueChanged += RadPropertyGrid1_ValueChanged;
        }

        private void RadPropertyGrid1_ValueChanged(object sender, EventArgs e)
        {
            if (this.radPropertyGrid1.ActiveEditor is PropertyGridDropDownListEditor)
            {
                this.radPropertyGrid1.EndEdit();
            }
        }

Completed
Last Updated: 31 Jan 2024 11:39 by ADMIN
Release 2024 Q1 (2024.1.130)
Add the ReadOnly flag to true at the property of custom TestClass.
If you select a single object the this property is ReadOnly but if you select more than one objects it isn't ReadOnly anymore.
Completed
Last Updated: 31 Jan 2024 11:39 by ADMIN
Release 2024 Q1 (2024.1.130)
select two items in the grid, click on the ValueI in the MS GridView then press ESC and click again on ValueI: the cell is always empty.
Do the same thing in your RadPropertyGrid. The first time you get 0, the second time -2147483648.
Completed
Last Updated: 31 Jan 2024 11:39 by ADMIN
Release 2024 Q1 (2024.1.130)
I have problem with your default PropertyGridDropDownListEditor. When the dropdown initially appears at 175% scaling, there's excessive empty space at the bottom of the values list.
2 3 4 5 6 7