Class ColumnCollection
A collection of DataGridColumn, that represent the columns in a SfDataGrid control. This class cannot be inherited.
Implements
Inherited Members
Namespace: Syncfusion.Maui.DataGrid
Assembly: Syncfusion.Maui.DataGrid.dll
Syntax
[ComVisible(false)]
public sealed class ColumnCollection : ObservableCollection<DataGridColumn>, IList<DataGridColumn>, ICollection<DataGridColumn>, IList, ICollection, IReadOnlyList<DataGridColumn>, IReadOnlyCollection<DataGridColumn>, IEnumerable<DataGridColumn>, IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged
Remarks
Use the ColumnCollection to programmatically manage a collection of DataGridColumn in a SfDataGrid control. You can add, remove or insert columns in the ColumnCollection.
Constructors
ColumnCollection()
Initializes a new instance of the ColumnCollection class.
Declaration
public ColumnCollection()
Properties
this[string]
Gets a DataGridColumn-derived column object with the specified MappingName from the Columns collection.
Declaration
public DataGridColumn? this[string mappingName] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| string | mappingName | The mapping name of the column whose column object to be retrieved. |
Property Value
| Type | Description |
|---|---|
| DataGridColumn | A DataGridColumn object in the Columns collection, associated with the given mapping name. |
Remarks
Use this Indexer to get a DataGridColumn-derived column object with the specified MappingName from the Columns collection using array notation.
Methods
Resume()
Resumes the UI refresh when the columns are being added or removed.
Declaration
public void Resume()
Remarks
Update columns by calling RefreshColumns(SfDataGrid) method when the column updates are resumed.
Suspend()
Suspends the UI refresh when the columns are being added or removed.
Declaration
public void Suspend()