ShinobiControls Xamarin Bindings Documentation

ShinobiGrids : ShinobiGrids Namespace

SDataGridDataSource Class

Abstract base class for your class that links your data to your data grid.

Syntax

[Foundation.Model]
[Foundation.Protocol]
[Foundation.Register("SDataGridDataSource", true)]
public abstract class SDataGridDataSource : Foundation.NSObject, ISDataGridDataSource, IDisposable

Remarks

The SDataGridDataSource protocol is adopted by an object that mediates the application's data model for a ShinobiDataGrid object. The datasource is responsible for providing the necessary information to construct a ShinobiDataGrid object - such as the number of rows/sections and for populating cells for each coordinate in the grid.

Information relating to the style and appearance of the ShinobiDataGrid is provided by the object that conforms to the SDataGridDelegate protocol. In this manner, the data model and appearance of the grid are kept separate.

ShinobiDataGrid uses cell pooling to make your grid as memory efficient as possible. Cells that are not currently visible are returned to an internal cell pool for later use and cells that become visible due to users scrolling/panning are retrieved from this pool. This means that ShinobiDataGrid caches cells only for visible rows and columns, but caches styling objects for the entire grid. For this reason, an appropriate cell object is handed to the SDataGridDataSource.PrepareCellForDisplay(ShinobiDataGrid, SDataGridCell) method and is the primary method for populating cells.

Requirements

Namespace: ShinobiGrids
Assembly: ShinobiGrids (in ShinobiGrids.dll)
Assembly Versions: 2.8.0.4

Members

See Also: Inherited members from Foundation.NSObject.

Public Constructors

Default constructor

Protected Constructors

Constructor to call on derived classes to skip initialization and merely allocate the object.
A constructor used when creating managed representations of unmanaged objects.

Protected Methods

GetFrozenHeaderTitle (ShinobiDataGrid, nint) : string
Documentation for this section has not yet been entered.
GetFrozenHeaderView (ShinobiDataGrid, nint, CoreGraphics.CGRect) : UIKit.UIView
Documentation for this section has not yet been entered.
GetHeaderTitle (ShinobiDataGrid, nint) : string
Documentation for this section has not yet been entered.
GetHeaderView (ShinobiDataGrid, nint, CoreGraphics.CGRect) : UIKit.UIView
Documentation for this section has not yet been entered.
abstract
GetNumberOfRowsInSection (ShinobiDataGrid, nint) : nuint
Documentation for this section has not yet been entered.
GetNumberOfSections (ShinobiDataGrid) : nuint
Asks the data source to return the number of sections that the ShinobiDataGrid object should have.
abstract
PrepareCellForDisplay (ShinobiDataGrid, SDataGridCell)
Required: This is the primary datasource method that gives you the opportunity to apply data/content to a cell prior to its appearance in the grid.

Member Details

SDataGridDataSource Constructor

Default constructor

Syntax

[Foundation.Export("init")]
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)]
public SDataGridDataSource ()

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: ShinobiGrids
Assembly: ShinobiGrids (in ShinobiGrids.dll)
Assembly Versions: 2.8.0.4

SDataGridDataSource Constructor

Constructor to call on derived classes to skip initialization and merely allocate the object.

Syntax

[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)]
protected SDataGridDataSource (Foundation.NSObjectFlag t)

Parameters

t
Unused sentinel value

Remarks

You should not invoke this method directly.

Requirements

Namespace: ShinobiGrids
Assembly: ShinobiGrids (in ShinobiGrids.dll)
Assembly Versions: 2.8.0.4

SDataGridDataSource Constructor

A constructor used when creating managed representations of unmanaged objects.

Syntax

[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)]
protected SDataGridDataSource (IntPtr handle)

Parameters

handle
Handle of the unmanaged object

Remarks

You should not invoke this method directly.

Requirements

Namespace: ShinobiGrids
Assembly: ShinobiGrids (in ShinobiGrids.dll)
Assembly Versions: 2.8.0.4

GetFrozenHeaderTitle Method

Documentation for this section has not yet been entered.

Syntax

[Foundation.Export("shinobiDataGrid:titleForFrozenHeaderInSection:")]
protected virtual string GetFrozenHeaderTitle (ShinobiDataGrid grid, nint section)

Parameters

grid
Documentation for this section has not yet been entered.
section
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: ShinobiGrids
Assembly: ShinobiGrids (in ShinobiGrids.dll)
Assembly Versions: 2.8.0.4

GetFrozenHeaderView Method

Documentation for this section has not yet been entered.

Syntax

[Foundation.Export("shinobiDataGrid:viewForFrozenHeaderInSection:inFrame:")]
protected virtual UIKit.UIView GetFrozenHeaderView (ShinobiDataGrid grid, nint section, CoreGraphics.CGRect frame)

Parameters

grid
Documentation for this section has not yet been entered.
section
Documentation for this section has not yet been entered.
frame
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: ShinobiGrids
Assembly: ShinobiGrids (in ShinobiGrids.dll)
Assembly Versions: 2.8.0.4

GetHeaderTitle Method

Documentation for this section has not yet been entered.

Syntax

[Foundation.Export("shinobiDataGrid:titleForHeaderInSection:")]
protected virtual string GetHeaderTitle (ShinobiDataGrid grid, nint section)

Parameters

grid
Documentation for this section has not yet been entered.
section
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: ShinobiGrids
Assembly: ShinobiGrids (in ShinobiGrids.dll)
Assembly Versions: 2.8.0.4

GetHeaderView Method

Documentation for this section has not yet been entered.

Syntax

[Foundation.Export("shinobiDataGrid:viewForHeaderInSection:inFrame:")]
protected virtual UIKit.UIView GetHeaderView (ShinobiDataGrid grid, nint section, CoreGraphics.CGRect frame)

Parameters

grid
Documentation for this section has not yet been entered.
section
Documentation for this section has not yet been entered.
frame
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: ShinobiGrids
Assembly: ShinobiGrids (in ShinobiGrids.dll)
Assembly Versions: 2.8.0.4

GetNumberOfRowsInSection Method

Documentation for this section has not yet been entered.

Syntax

[Foundation.Export("shinobiDataGrid:numberOfRowsInSection:")]
protected abstract nuint GetNumberOfRowsInSection (ShinobiDataGrid grid, nint sectionIndex)

Parameters

grid
Documentation for this section has not yet been entered.
sectionIndex
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: ShinobiGrids
Assembly: ShinobiGrids (in ShinobiGrids.dll)
Assembly Versions: 2.8.0.4

GetNumberOfSections Method

Asks the data source to return the number of sections that the ShinobiDataGrid object should have.

Syntax

[Foundation.Export("numberOfSectionsInShinobiDataGrid:")]
protected virtual nuint GetNumberOfSections (ShinobiDataGrid grid)

Parameters

grid
The grid that is requesting this information.

Returns

The number of sections that grid will have.

Remarks

This data source method is optional - if this method is not implemented the grid will have 1 section by default.

Important: If 1 is returned in this method you MUST implement the SDataGridDelegate method SDataGridDelegate.GetSectionHeaderStyle(ShinobiDataGrid, NInt) for that section to be displayed. The SDataGridDelegate method returns the SDataGridSectionHeaderStyle to be applied to your grid's only section header. If this method is not implemented your section header WILL NOT be displayed.

Requirements

Namespace: ShinobiGrids
Assembly: ShinobiGrids (in ShinobiGrids.dll)
Assembly Versions: 2.8.0.4

PrepareCellForDisplay Method

Required: This is the primary datasource method that gives you the opportunity to apply data/content to a cell prior to its appearance in the grid.

Syntax

[Foundation.Export("shinobiDataGrid:prepareCellForDisplay:")]
protected abstract void PrepareCellForDisplay (ShinobiDataGrid grid, SDataGridCell cell)

Parameters

grid
Documentation for this section has not yet been entered.
cell
Documentation for this section has not yet been entered.

Remarks

Important: The grid recycles cells for performance reasons. This means that any cell provided to you by this method may have already been used within the grid. It is therefore important to set all content on the cell for its given position SDataGridCell.Coordinate so that no artefacts from prior use are present when displayed.

Requirements

Namespace: ShinobiGrids
Assembly: ShinobiGrids (in ShinobiGrids.dll)
Assembly Versions: 2.8.0.4