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 of sections to display in the data grid.
Declaration
Swift
func numberOfSectionsInDataGridView(_ dataGridView: SwiftGridView) -> IntParameters
dataGridViewThe 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) -> IntParameters
dataGridViewThe 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
dataGridViewThe 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) -> IntParameters
dataGridViewThe swift grid view instance.
sectionCurrent 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) -> IntParameters
dataGridViewThe 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) -> IntParameters
dataGridViewThe swift grid view instance.
Return Value
Count of frozen columns in the data grid.
-
Return the cell content to be displayed in the data grid for the provided indexPath.
- Paramter indexPath: The Swift Grid extended index path location of the cell.
Declaration
Swift
func dataGridView(_ dataGridView: SwiftGridView, cellAtIndexPath indexPath: IndexPath) -> SwiftGridCellParameters
dataGridViewThe swift grid view instance.
Return Value
Cell that has been dequeued and of
SwiftGridCelltype. -
Return the header view to be displayed in the provided column.
Declaration
Swift
@objc optional func dataGridView(_ dataGridView: SwiftGridView, gridHeaderViewForColumn column: NSInteger) -> SwiftGridReusableViewParameters
dataGridViewThe swift grid view instance.
columnCurrent column index.
Return Value
View that has been dequeued and of
SwiftGridReusableViewtype. -
Return the header view to be displayed in the provided column grouping
Declaration
Swift
@objc optional func dataGridView(_ dataGridView: SwiftGridView, groupedHeaderViewFor columnGrouping: [Int], at index: Int) -> SwiftGridReusableViewParameters
dataGridViewThe swift grid view instance.
columnGroupingCurrent grouping.
indexCurrent grouping index.
Return Value
View that has been dequeued and of
SwiftGridReusableViewtype. -
Number of sections to display in the data grid
Declaration
Swift
@objc optional func dataGridView(_ dataGridView: SwiftGridView, gridFooterViewForColumn column: NSInteger) -> SwiftGridReusableViewParameters
dataGridViewThe swift grid view instance.
columnCurrent column index.
Return Value
View that has been dequeued and of
SwiftGridReusableViewtype. -
Number of sections to display in the data grid
Declaration
Swift
@objc optional func dataGridView(_ dataGridView: SwiftGridView, sectionHeaderCellAtIndexPath indexPath: IndexPath) -> SwiftGridReusableViewParameters
dataGridViewThe swift grid view instance.
indexPathCurrent Swift Grid index path for the section header. Section and Column are provided values, Row is ignored.
Return Value
View that has been dequeued and of
SwiftGridReusableViewtype. -
Number of sections to display in the data grid
Declaration
Swift
@objc optional func dataGridView(_ dataGridView: SwiftGridView, sectionFooterCellAtIndexPath indexPath: IndexPath) -> SwiftGridReusableViewParameters
dataGridViewThe swift grid view instance.
indexPathCurrent Swift Grid index path for the section footer. Section and Column are provided values, Row is ignored.
Return Value
View that has been dequeued and of
SwiftGridReusableViewtype.
View on GitHub