Declined
Last Updated: 17 Aug 2020 14:27 by ADMIN
Oleg
Created on: 17 Jul 2020 11:08
Category: PropertyGrid
Type: Bug Report
0
RadPropertyGrid: NullReferenceException is thrown when using custom item and grouping

1. Create a custom property item

2. Enable grouping

3.Scroll up and down

4.NullReferenceException occurs

Attached Files:
1 comment
ADMIN
Dimitar
Posted on: 17 Aug 2020 14:25

When radPropertyGrid is grouped, we should check in IsCompatible() method that the item is not a PropertyGridGroupItem because the GroupItem is not compatible with the PropertyGridItem.

public class DefaultPropertyGridItemElement : PropertyGridItemElement
{

   public override bool IsCompatible(PropertyGridItemBase data, object context)
   {
      return (data is PropertyGridItem) && data.Label != "DbCounterState";
   }

}