ShinobiControls Xamarin Bindings Documentation

ShinobiGrids : ShinobiGrids Namespace

SGridDataSource Class

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

Syntax

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

Remarks

The datasource is responsible for providing the necessary information to construct a ShinobiGrid object - such as the number of Rows/sections/Columns and for returning appropriate cells for each coordinate in the grid. Information relating to the style and appearance of the ShinobiGrid is provided by the SGridDelegate object. In this manner the data model and appearance of the grid are kept separate. ShinobiGrid 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 ShinobiGrid caches cells only for visible Rows and Columns, but caches styling objects for the entire grid. For ShinobiGrid to be able to pool cells correctly it needs to know what the cells will be used for. You should use a different `reuseIdentifier` for each distinct type of cell within your grid - for example if you have header cells and normal cells in your grid, you might use the identifiers `HEADER` and `NORMAL`.

For code examples of using the identifiers see the ShinobiGrid sample apps.

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

abstract
GetCell (ShinobiGrid, SGridCoord) : SGridCell
Asks the data source for a cell to insert at a particular coordinate within the ShinobiGrid object.
GetFrozenHeaderTitle (ShinobiGrid, nint) : string
Documentation for this section has not yet been entered.
GetFrozenHeaderView (ShinobiGrid, nint, CoreGraphics.CGRect) : UIKit.UIView
Documentation for this section has not yet been entered.
GetHeaderTitle (ShinobiGrid, nint) : string
Documentation for this section has not yet been entered.
GetHeaderView (ShinobiGrid, nint, CoreGraphics.CGRect) : UIKit.UIView
Documentation for this section has not yet been entered.
abstract
GetNumberOfCols (ShinobiGrid) : nuint
Asks the data source to return the number of Columns that the ShinobiGrid object should have.
abstract
GetNumberOfRows (ShinobiGrid, nint) : nuint
Documentation for this section has not yet been entered.
GetNumberOfSections (ShinobiGrid) : nuint
Asks the data source to return the number of sections that the ShinobiGrid object should have.

Member Details

SGridDataSource Constructor

Default constructor

Syntax

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

Remarks

Requirements

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

SGridDataSource Constructor

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

Syntax

[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)]
protected SGridDataSource (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

SGridDataSource Constructor

A constructor used when creating managed representations of unmanaged objects.

Syntax

[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)]
protected SGridDataSource (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

GetCell Method

Asks the data source for a cell to insert at a particular coordinate within the ShinobiGrid object.

Syntax

[Foundation.Export("shinobiGrid:cellForGridCoord:")]
protected abstract SGridCell GetCell (ShinobiGrid grid, SGridCoord gridCoord)

Parameters

grid
The grid that is requesting the cell.
gridCoord
Represents the column, row and section that the returned cell will belong to.

Returns

The SGridCell object that you wish to appear at `gridCoord` of `grid`.

Remarks

Null can be returned if a cell is to be empty. For more information on providing content for a cell see the documentation on the ShinobiGrid.SGridCell class.

*Important* Cell frames are sized automatically and so any frame assigned to a cell will be ignored - specific columns and rows can be sized by implementing functions of the SGridDelegate object, or uniform cell sizes for the whole grid can be assigned through the `defaultRowStyle` and/or `defaultColumnStyle` properties of the ShinobiGrid object.

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("shinobiGrid:titleForFrozenHeaderInSection:")]
protected virtual string GetFrozenHeaderTitle (ShinobiGrid 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("shinobiGrid:viewForFrozenHeaderInSection:inFrame:")]
protected virtual UIKit.UIView GetFrozenHeaderView (ShinobiGrid 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("shinobiGrid:titleForHeaderInSection:")]
protected virtual string GetHeaderTitle (ShinobiGrid 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("shinobiGrid:viewForHeaderInSection:inFrame:")]
protected virtual UIKit.UIView GetHeaderView (ShinobiGrid 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

GetNumberOfCols Method

Asks the data source to return the number of Columns that the ShinobiGrid object should have.

Syntax

[Foundation.Export("numberOfColsForShinobiGrid:")]
protected abstract nuint GetNumberOfCols (ShinobiGrid grid)

Parameters

grid
The grid that is requesting this information.

Returns

The number of Columns that `grid` will have.

Remarks

Requirements

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

GetNumberOfRows Method

Documentation for this section has not yet been entered.

Syntax

[Foundation.Export("shinobiGrid:numberOfRowsInSection:")]
protected abstract nuint GetNumberOfRows (ShinobiGrid 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 ShinobiGrid object should have.

Syntax

[Foundation.Export("numberOfSectionsInShinobiGrid:")]
protected virtual nuint GetNumberOfSections (ShinobiGrid 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 SGridDelegate method SGridDelegate.GetSectionHeaderStyle(ShinobiGrid, NInt) for that section to be displayed. The SGridDelegate method returns the SGridSectionHeaderStyle 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