SwiftGridViewDataSource

@objc
public protocol SwiftGridViewDataSource

The SwiftGridViewDataSource protocol is used much like a UICollectionView or UITableView data source for retrieving all data needed to display the data grid.

Count methods

  • Count of sections to display in the data grid.

    Declaration

    Swift

    func numberOfSectionsInDataGridView(_ dataGridView: SwiftGridView) -> Int

    Parameters

    dataGridView

    The swift grid view instance.

    Return Value

    The number of sections within the data grid.

  • Count of columns to display in the data grid.

    Declaration

    Swift

    func numberOfColumnsInDataGridView(_ dataGridView: SwiftGridView) -> Int

    Parameters

    dataGridView

    The swift grid view instance.

    Return Value

    The number of columns within the data grid.

  • The grouping settings to use for the data grid. Expects an array of grouped column index sets for the first and last column index in each grouping. Columns cannot be included in multiple groupings. Example: [[1,4], [5,8]]

    Declaration

    Swift

    @objc
    optional func columnGroupingsForDataGridView(_ dataGridView: SwiftGridView) -> [[Int]]

    Parameters

    dataGridView

    The swift grid view instance.

    Return Value

    Array of grouped column index sets.

  • Number of rows to display in the provided data grid section.

    Declaration

    Swift

    func dataGridView(_ dataGridView: SwiftGridView, numberOfRowsInSection section: Int) -> Int

    Parameters

    dataGridView

    The swift grid view instance.

    section

    Current section index.

    Return Value

    The number of rows for the current section.

  • Number of frozen rows in the provided section. Frozen rows start from the top and will be “frozen” in place and not scroll vertically out of view.

    Declaration

    Swift

    @objc
    optional func dataGridView(_ dataGridView: SwiftGridView, numberOfFrozenRowsInSection section: Int) -> Int

    Parameters

    dataGridView

    The swift grid view instance.

    Return Value

    Count of frozen columns in the data grid.

  • Number of frozen columns in the data grid. Frozen columns start from the left and will be “frozen” in place and not scroll horizontally out of view.

    Declaration

    Swift

    @objc
    optional func numberOfFrozenColumnsInDataGridView(_ dataGridView: SwiftGridView) -> Int

    Parameters

    dataGridView

    The swift grid view instance.

    Return Value

    Count of frozen columns in the data grid.

Cell Methods