Version: Unity 6.0 (6000.0)
LanguageEnglish
  • C#

MultiColumnListView

class in UnityEngine.UIElements

/

Inherits from:UIElements.BaseListView

/

Implemented in:UnityEngine.UIElementsModule

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

A list view with multi column support. For more information, refer to MultiColumnListView.

Properties

Description
columns The collection of columns for the multi-column header.
sortColumnDescriptions The collection of sorted columns by default.
sortedColumns Contains information about which columns are currently being sorted.
sortingMode Indicates how to sort columns. To enable sorting, set it to ColumnSortingMode.Default or ColumnSortingMode.Custom. The Default mode uses the sorting algorithm provided by MultiColumnController, acting on indices. You can also implement your own sorting with the Custom mode, by responding to the columnSortingChanged event.
viewController The view controller for this view, cast as a MultiColumnListViewController.

Constructors

Description
MultiColumnListView Initializes a MultiColumnListView with an empty header.

Public Methods

Description
SetViewController Assigns the view controller for this view and registers all events required for it to function properly.

Events

Description
columnSortingChanged If a column is clicked to change sorting, this event is raised to allow users to sort the list view items. For a default implementation, set sortingMode to ColumnSortingMode.Default.
headerContextMenuPopulateEvent If a column is right-clicked to show context menu options, this event is raised to allow users to change the available options.

Inherited Members

Static Properties

Description
arraySizeFieldUssClassName The USS class name for the size field of the ListView when show bound collection size is enabled
arraySizeFieldWithFooterUssClassName The USS class name for the size field of the ListView when the footer is enabled.
arraySizeFieldWithHeaderUssClassName The USS class name for the size field of the ListView when foldout header is enabled.
emptyLabelUssClassName The USS class name for label displayed when ListView is empty.
foldoutHeaderUssClassName The USS class name for the foldout header of the ListView.
footerAddButtonName The name of the add button element in the footer.
footerRemoveButtonName The name of the remove button element in the footer.
footerUssClassName The USS class name for the footer of the ListView.
itemUssClassName The USS class name of item elements in ListView elements.
listViewWithFooterUssClassName The USS class name for ListView when add/remove footer is enabled.
listViewWithHeaderUssClassName The USS class name for ListView when foldout header is enabled.
overMaxMultiEditLimitClassName The USS class name for label displayed when ListView is trying to edit too many items.
reorderableItemContainerUssClassName The USS class name for item container in reorderable animated ListView.
reorderableItemHandleBarUssClassName The USS class name for drag handle bar in reorderable animated ListView.
reorderableItemHandleUssClassName The USS class name for drag handle in reorderable animated ListView.
reorderableItemUssClassName The USS class name for item elements in reorderable animated ListView.
reorderableUssClassName The USS class name for reorderable animated ListView elements.
scrollViewWithFooterUssClassName The USS class name for scroll view when add/remove footer is enabled.
ussClassName The USS class name for ListView elements.
borderUssClassName The USS class name for BaseVerticalCollectionView elements with a border.
dragHoverBarUssClassName The USS class name of the drag hover bar.
dragHoverMarkerUssClassName The USS class name of the drag hover circular marker used to indicate depth.
itemAlternativeBackgroundUssClassName The USS class name for odd rows in the BaseVerticalCollectionView.
itemDragHoverUssClassName The USS class name applied to an item element on drag hover.
itemSelectedVariantUssClassName The USS class name of selected item elements in the BaseVerticalCollectionView.
listScrollViewUssClassName The USS class name of the scroll view in the BaseVerticalCollectionView.
disabledUssClassName USS class name of local disabled elements.

Properties

Description
allowAdd This property allows the user to allow or block the addition of an item when clicking on the Add Button. It must return true or false.
allowRemove This property allows the user to allow or block the removal of an item when clicking on the Remove Button. It must return true or false.
bindingSourceSelectionMode This property controls whether every element in the list will get its data source setup automatically to the correct item in the collection's source.
headerTitle This property controls the text of the foldout header when using showFoldoutHeader.
makeFooter This callback allows the user to make their own footer for this control.
makeHeader This callback allows the user to make their own header for this control.
makeNoneElement This callback allows the user to set a Visual Element to replace the "List is empty" Label shown when the ListView is empty.
onAdd This callback allows the user to implement their own code to be executed when the Add Button is clicked.
onRemove This callback allows the user to implement their own code to be executed when the Remove Button is clicked.
overridingAddButtonBehavior This callback allows the user to implement a DropdownMenu when the Add Button is clicked.
reorderMode This property controls the drag and drop mode for the list view.
showAddRemoveFooter This property controls whether a footer will be added to the list view.
showBoundCollectionSize This property controls whether the list view displays the collection size (number of items).
showFoldoutHeader This property controls whether the list view displays a header, in the form of a foldout that can be expanded or collapsed.
viewController The view controller for this view, cast as a BaseListViewController.
contentContainer Returns the content container for the BaseVerticalCollectionView. Because the BaseVerticalCollectionView control automatically manages its content, this always returns null.