Class ColumnCollection
A collection of DataGridColumn, that represent the columns in a SfDataGrid control. This class cannot be inherited.
Inheritance
Namespace: Syncfusion.Maui.DataGrid
Assembly: Syncfusion.Maui.DataGrid.dll
Syntax
public sealed class ColumnCollection : ObservableCollection<DataGridColumn>
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
Item[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 |
---|---|---|
System.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 Syncfusion.Maui.DataGrid.Helper.SfDataGridHelpers.RefreshColumns(Syncfusion.Maui.DataGrid.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()