Back to Devexpress

PropertyGridControl.UseCollectionEditor Property

wpf-devexpress-dot-xpf-dot-propertygrid-dot-propertygridcontrol-cae3ae6d.md

latest3.2 KB
Original Source

PropertyGridControl.UseCollectionEditor Property

Specifies whether to enable collection editing within the grid. This is a dependency property.

Namespace : DevExpress.Xpf.PropertyGrid

Assembly : DevExpress.Xpf.PropertyGrid.v25.2.dll

NuGet Package : DevExpress.Wpf.PropertyGrid

Declaration

csharp
public bool? UseCollectionEditor { get; set; }
vb
Public Property UseCollectionEditor As Boolean?

Property Value

TypeDescription
Nullable<Boolean>

true, to enable collection editing; otherwise, false.

|

Remarks

The UseCollectionEditor property controls whether to use the collection editor. Set this property to false to display the collection definition as a property definition. In this case, the PropertyGridControl does not display expand and Add / Remove buttons.

To specify whether collection editing is enabled for an individual collection, use its CollectionDefinition.UseCollectionEditor property. To learn more, see Managing Collection Properties.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the UseCollectionEditor property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-propertygrid-add-an-item-to-a-collection-or-a-dictionary/CS/MainWindow.xaml#L19

xml
</Grid.ColumnDefinitions>
<dxprg:PropertyGridControl Name="pGrid" SelectedObject="{Binding Path=CurrentItem, ElementName=grid}" Grid.Column="1" UseCollectionEditor="{x:Null}"
                           ShowProperties="WithPropertyDefinitions" ShowCategories="False" CellValueChanged="pGrid_CellValueChanged" >

See Also

Collection Definitions

PropertyGridControl Class

PropertyGridControl Members

DevExpress.Xpf.PropertyGrid Namespace