Class GridModel
Represents a wrapper class for a SfDataGrid control handling the collection and view related operations.
Inheritance
Implements
Namespace: Syncfusion.SfDataGrid.XForms
Assembly: Syncfusion.SfDataGrid.XForms.dll
Syntax
public class GridModel : Object, IDisposable
Remarks
GridModel listens to the collection changes in a SfDataGrid control and responds to them. It updates the View in response to the collection changes.
Constructors
GridModel(SfDataGrid)
Initializes a new instance of the GridModel class using the specified SfDataGrid object.
Declaration
public GridModel(SfDataGrid grid)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | grid | The reference of the SfDataGrid. |
Methods
CollapseGroup(Group)
Method which helps to collapse the specific group by passing the corresponding group.
Declaration
public bool CollapseGroup(Group group)
Parameters
Type | Name | Description |
---|---|---|
Group | group | The group to be collapsed. |
Returns
Type | Description |
---|---|
System.Boolean | Returns a boolean value indicating whether this collapsing action is succeeded or failed. |
Dispose()
Perform final clean up before it is released from memory.
Declaration
public void Dispose()
Dispose(Boolean)
Releases the unmanaged resources used by the component and optionally releases the managed resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | if true - release both managed and unmanaged resources; if false - release only unmanaged resources. |
ExpandGroup(Group)
Method which helps to expand the specific group by passing the corresponding group.
Declaration
public bool ExpandGroup(Group group)
Parameters
Type | Name | Description |
---|---|---|
Group | group | The group to be expanded. |
Returns
Type | Description |
---|---|
System.Boolean | Returns a boolean value indicating whether this expanding action is succeeded or failed. |
MakeSort(GridColumn)
Makes the sort and remove the sort in a SfDataGrid control. Executes when a header cell is touched if the AllowSorting property in SfDataGrid and the GridColumn associated with the header cell is true.
Adds and clears SortColumnDescription in the SortColumnDescriptions collection in a SfDataGrid control.
Declaration
public void MakeSort(GridColumn gridColumn)
Parameters
Type | Name | Description |
---|---|---|
GridColumn | gridColumn | A GridColumn object to be sorted. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Mapping Name necessary for Sorting. |
RefreshDataRow()
Refreshes the Syncfusion.SfDataGrid.XForms.DataRow objects in the view.
Declaration
public void RefreshDataRow()
RefreshView()
Refreshes the view.
Declaration
public void RefreshView()