Conforms to UIScrollViewDelegate
Declared in SDataGridDelegate.h
Availability
Related samples

Overview

The delegate of a ShinobiDataGrid (data-grid) object must adopt the SDataGridDelegate protocol. The delegate concerns itself with the styling of the data-grid and can also receive notifications about actions the data-grid may take or has taken in response to events and interactions.

The delegate should only be used for styling where you wish to provide a style for a particular row, column or gridline, or where each row/column/gridline is to have its own distinct style. If you wish to apply a uniform row/column/gridline style for the entire data-grid then the properites defaultCellStyleForRows, defaultCellStyleForAlternateRows, etc of your ShinobiDataGrid object are designed for this purpose and provide better performance than use of the delegate.

Hint: There are many layers to the grid and, as such, there are many layers of style objects. The application of these styles is subject to a strict precedence heirarchy, covered in more detail in the DataGridUserGuide

Tasks

Styling Rows and Columns

Styling Gridlines

Styling Section Headers

Grid Layout/Render Notifications

Receiving Section Expand and Collapse Notifications

Cell Selection Notifications

Cell Editing Notifications

Cell Gesture Notifications

Receiving Row Selection Notifications

Column Resizing Notifications

Column and Row Reordering Notifications

Column Sorting Notifications

Instance Methods

didFinishLayingOutShinobiDataGrid:

Tells the delegate that the grid has finished laying out.

- (void)didFinishLayingOutShinobiDataGrid:(ShinobiDataGrid *)grid

Parameters

grid

The grid which has finished laying out/rendering.

Discussion

The grid lays out, and subsequently calls this method, upon initial render/layout, section collapse/expand and device rotation.

Declared In

SDataGridDelegate.h

shinobiDataGrid:alterStyle:beforeApplyingToCellAtCoordinate:

Gives the delegate a chance to change the style that is about to be applied to a particular cell.

- (void)shinobiDataGrid:(ShinobiDataGrid *)grid alterStyle:(SDataGridCellStyle *)styleToApply beforeApplyingToCellAtCoordinate:(SDataGridCoord *)coordinate

Parameters

grid

The grid that the cell belongs to.

styleToApply

The style about to be applied to the cell.

coordinate

The coordinate that identifies the location of the cell.

Discussion

This method is called whenever a cell is about to have a style applied to it, either upon a layout of the grid or upon a scroll gesture bringing a new cell into view.

Declared In

SDataGridDelegate.h

shinobiDataGrid:cellCanRespondToDoubleTap:

Asks the delegate whether a cell in the grid can respond to a double tap. Use this method to speed up single taps on cells which don’t respond to a double tap.

- (BOOL)shinobiDataGrid:(ShinobiDataGrid *)grid cellCanRespondToDoubleTap:(const SDataGridCell *)cell

Parameters

grid

The grid containing the cell that has been tapped.

cell

The cell which may be double tapped.

Declared In

SDataGridDelegate.h

shinobiDataGrid:didChangeSortOrderForColumn:from:

Informs the delegate that a column has just had its sortOrder changed as a result of a user’s tap gesture on said column’s header cell.

- (void)shinobiDataGrid:(ShinobiDataGrid *)grid didChangeSortOrderForColumn:(SDataGridColumn *)column from:(SDataGridColumnSortOrder)oldSortOrder

Parameters

grid

The grid that the column in question belongs to.

column

The column that has just had its sortOrder changed

oldSortOrder

The sort order that the column had prior to the change.

Declared In

SDataGridDelegate.h

shinobiDataGrid:didCollapseSectionAtIndex:

Tells the delegate that a section within the ShinobiDataGrid object has collapsed.

- (void)shinobiDataGrid:(ShinobiDataGrid *)grid didCollapseSectionAtIndex:(NSUInteger)sectionIndex

Parameters

grid

The grid which contains the section that has collapsed.

sectionIndex

The index of the section that has collapsed.

Declared In

SDataGridDelegate.h

shinobiDataGrid:didDeselectCellAtCoordinate:

Tells the delegate that a cell within the ShinobiDataGrid object has been deselected.

- (void)shinobiDataGrid:(ShinobiDataGrid *)grid didDeselectCellAtCoordinate:(const SDataGridCoord *)gridCoordinate

Parameters

grid

The grid containing the cell that has been deselected.

gridCoordinate

The coordinate of the cell that has been deselected.

Declared In

SDataGridDelegate.h

shinobiDataGrid:didDeselectRow:

Informs the delegate that the deselection of an entire row has just happened as a result of the user having tapped a cell.

- (void)shinobiDataGrid:(ShinobiDataGrid *)grid didDeselectRow:(SDataGridRow *)row

Parameters

grid

The grid that has just had a row set as deselected.

row

The row that has just been set as deselected.

Discussion

Note that cellSelectionMode must be set to SDataGridSelectionModeRowSingle or SDataGridSelectionModeRowMulti for this delegate method to be called and that the cell selection delegate methods such as shinobiGrid:didSelectCellAtCoordinate: will be called before this method.

Declared In

SDataGridDelegate.h

shinobiDataGrid:didEndReorderingColumn:

Informs the delegate that the specified column has completed reordering

- (void)shinobiDataGrid:(ShinobiDataGrid *)grid didEndReorderingColumn:(SDataGridColumn *)column

Parameters

grid

The datagrid which contains the column

column

The column which has been dropped

Discussion

This is called when the user’s drag gesture has been completed.

Declared In

SDataGridDelegate.h

shinobiDataGrid:didEndReorderingRow:

Informs the delegate that the specified row has completed reordering

- (void)shinobiDataGrid:(ShinobiDataGrid *)grid didEndReorderingRow:(SDataGridRow *)row

Parameters

grid

The datagrid which contains the row

row

The row which has been dropped

Discussion

This is called when the user’s drag gesture has been completed.

Declared In

SDataGridDelegate.h

shinobiDataGrid:didEndResizingColumn:fromWidth:toWidth:

Tells the delegate that a column has completed resizing a column

- (void)shinobiDataGrid:(ShinobiDataGrid *)grid didEndResizingColumn:(SDataGridColumn *)column fromWidth:(CGFloat)oldWidth toWidth:(CGFloat)newWidth

Parameters

grid

The grid containing the column that has been resized.

column

The index of the column that has been resized.

oldWidth

The width that the column used to be before the resize.

newWidth

The width that the column now has.

Discussion

This method is called once the user’s pinch gesture has been completed.

Declared In

SDataGridDelegate.h

shinobiDataGrid:didExpandSectionAtIndex:

Tells the delegate that a section within the ShinobiDataGrid object has expanded.

- (void)shinobiDataGrid:(ShinobiDataGrid *)grid didExpandSectionAtIndex:(NSUInteger)sectionIndex

Parameters

grid

The grid which contains the section that has expanded.

sectionIndex

The index of the section that has expanded.

Declared In

SDataGridDelegate.h

shinobiDataGrid:didFinishEditingCellAtCoordinate:

Informs the delegate that a cell within the ShinobiDataGrid object has been edited.

- (void)shinobiDataGrid:(ShinobiDataGrid *)grid didFinishEditingCellAtCoordinate:(const SDataGridCoord *)coordinate

Parameters

grid

The grid which contains the cell that has been edited.

coordinate

The coordinate of the cell within grid that has been edited.

Discussion

This method gives the delegate an opportunity to feed back any changes that the user makes to the grid to the data source.

Declared In

SDataGridDelegate.h

shinobiDataGrid:didReorderColumn:withColumn:

Informs the delegate that two columns within the ShinobiDataGrid object have been switched.

- (void)shinobiDataGrid:(ShinobiDataGrid *)grid didReorderColumn:(SDataGridColumn *)columnSwitched withColumn:(SDataGridColumn *)columnSwitchedWith

Parameters

grid

The grid that contains the columns that have been switched.

columnSwitched

The first switched column.

columnSwitchedWith

The second switched column.

Discussion

This method gives the delegate an opportunity to update the data source appropriately.

Warning: Important When a user drags and drops a column this only reorders the currently visible cells. Therefore it is important to update your data source so that when scrolling/panning takes place, the cells that become visible appear in the correct order.

Declared In

SDataGridDelegate.h

shinobiDataGrid:didReorderRow:withRow:

Informs the delegate that two rows within the ShinobiDataGrid object have been switched.

- (void)shinobiDataGrid:(ShinobiDataGrid *)grid didReorderRow:(SDataGridRow *)rowSwitched withRow:(SDataGridRow *)rowSwitchedWith

Parameters

grid

The grid that contains the columns that have been switched.

rowSwitched

The first switched row.

rowSwitchedWith

The second switched row.

Discussion

This method gives the delegate an opportunity to update the data source appropriately.

Warning: Important When a user drags and drops a row this only reorders the currently visible cells. Therefore it is important to update your data source so that when scrolling/panning takes place, the cells that become visible appear in the correct order.

Declared In

SDataGridDelegate.h

shinobiDataGrid:didResizeColumn:fromWidth:toWidth:

Tells the delegate that a column has resized to a new width.

- (void)shinobiDataGrid:(ShinobiDataGrid *)grid didResizeColumn:(SDataGridColumn *)column fromWidth:(CGFloat)currentWidth toWidth:(CGFloat)newWidth

Parameters

grid

The grid containing the column that will be resized.

column

The column that will be resized.

currentWidth

The width that the column at columnIndex currently has.

newWidth

The width that the column at columnIndex will change to.

Discussion

This method is called continously as a user’s pinch gesture changes. Each call to this method is made just prior to changing a columns width. If you want the width to be set to something other than newWidth then see the method shinobiDataGrid:widthForResizingColAtIndex:.

Declared In

SDataGridDelegate.h

shinobiDataGrid:didSelectCellAtCoordinate:

Tells the delegate that a cell within the ShinobiDataGrid object is about to be selected.

- (void)shinobiDataGrid:(ShinobiDataGrid *)grid didSelectCellAtCoordinate:(const SDataGridCoord *)gridCoordinate

Parameters

grid

The grid which contains the cell that is about to be selected.

gridCoordinate

The coordinate of the cell that is about to be selected.

Discussion

This method gives the delegate an opportunity to apply a custom selection style/animation to the cell or another part of the grid.

Declared In

SDataGridDelegate.h

shinobiDataGrid:didSelectRow:

Informs the delegate that the selection of an entire row has just happened as a result of the user having tapped a cell.

- (void)shinobiDataGrid:(ShinobiDataGrid *)grid didSelectRow:(SDataGridRow *)row

Parameters

grid

The grid that is about to have a row set as selected.

row

The row that is about to be selected.

Discussion

Note that cellSelectionMode must be set to SDataGridSelectionModeRowSingle or SDataGridSelectionModeRowMulti for this delegate method to be called and that the cell selection delegate methods such as shinobiDataGrid:didSelectCellAtCoordinate: will be called before this method.

Declared In

SDataGridDelegate.h

shinobiDataGrid:didTapCellAtCoordinate:isDoubleTap:

Tells the delegate that a cell within the ShinobiDataGrid object has been tapped.

- (void)shinobiDataGrid:(ShinobiDataGrid *)grid didTapCellAtCoordinate:(const SDataGridCoord *)gridCoordinate isDoubleTap:(BOOL)isDoubleTap

Parameters

grid

The grid containing the cell that has been tapped.

gridCoordinate

The coordinate of the cell that has been tapped.

isDoubleTap

Indicates whether the cell has been double tapped (single tap otherwise).

Declared In

SDataGridDelegate.h

shinobiDataGrid:heightForRowAtIndex:inSection:

Asks the delegate for the height of a particular grid row.

- (NSNumber *)shinobiDataGrid:(ShinobiDataGrid *)grid heightForRowAtIndex:(NSInteger)rowIndex inSection:(NSInteger)sectionIndex

Parameters

grid

The grid requesting the row height.

rowIndex

The index of the row within its section.

sectionIndex

The index of the section that the row belongs to.

Return Value

An NSNumber that reprsents the desired height of the row. Returning nil results in [ShinobiDataGrid defaultRowHeight] being used.

Discussion

If you want every row in your grid to have the same height then using [ShinobiDataGrid defaultRowHeight] is more efficient than using this method.

Declared In

SDataGridDelegate.h

shinobiDataGrid:permittedDragDirectionForCellAtCoordinate:

Asks the delegate for which drag and drop directions are permitted. This query is triggered from a gesture originating on the cell at a given coord.

- (SDataGridDragDirection)shinobiDataGrid:(ShinobiDataGrid *)grid permittedDragDirectionForCellAtCoordinate:(SDataGridCoord *)coordinate

Parameters

grid

The grid asking for the drag decision.

coordinate

The coordinate of the cell that the gesture originated from.

Return Value

An entry from the SDataGridDragDirection enum that controls the action the grid will take.

Discussion

Warning: Important Note that row dragging cannot be initiated from a frozen row and that column dragging cannot be initiated from a frozen column despite what you return from this method.

Declared In

SDataGridDelegate.h

shinobiDataGrid:shouldBeginEditingCellAtCoordinate:

Asks the delegate if a cell should respond to an edit event.

- (BOOL)shinobiDataGrid:(ShinobiDataGrid *)grid shouldBeginEditingCellAtCoordinate:(const SDataGridCoord *)coordinate

Parameters

grid

The grid containing the cell in question.

coordinate

The coordinate of the cell which wants to know if it should respond to an edit event.

Return Value

A BOOL that indicates if the cell will respond to an edit event. YES results in the cell responding, otherwise the cell ignores the edit event.

Discussion

Note that if you implement this method it overrides the editable property on the grid’s columns.

Declared In

SDataGridDelegate.h

shinobiDataGrid:shouldCollapseSectionAtIndex:

Asks the delegate whether a section within the ShinobiDataGrid should be allowed to collapse. This will only be called when a user taps the header of a currently expanded section. It will not be called when a section is collapsed programmatically.

- (BOOL)shinobiDataGrid:(ShinobiDataGrid *)grid shouldCollapseSectionAtIndex:(NSUInteger)sectionIndex

Parameters

grid

The grid which contains the section which would like to collapse

sectionIndex

The index of the section which would like to collapse

Declared In

SDataGridDelegate.h

shinobiDataGrid:shouldDeselectCellAtCoordinate:

Asks the delegate whether a currently selected cell that has been tapped should be marked as deselected.

- (BOOL)shinobiDataGrid:(ShinobiDataGrid *)grid shouldDeselectCellAtCoordinate:(const SDataGridCoord *)gridCoordinate

Parameters

grid

The grid which contains the cell in question.

gridCoordinate

The coordinate of the cell in question.

Discussion

This can be used to control deselection on a cell by cell basis.

Declared In

SDataGridDelegate.h

shinobiDataGrid:shouldDeselectRow:

Asks the delegate whether the currently selected row should be marked as deselected as the result of a tap gesture on a cell.

- (BOOL)shinobiDataGrid:(ShinobiDataGrid *)grid shouldDeselectRow:(SDataGridRow *)row

Parameters

grid

The ShinobiGrid which contains the row in question.

row

The row which may or may not be deselected depending on the return value.

Return Value

A BOOL that indicates if row should be marked as deselected.

Discussion

This method can only be called if the grid’s cellSelectionMode is set to SDataGridSelectionModeRowSingle or SDataGridSelectionModeRowMulti. Note that the cell selection/deselection delegate methods will be called after this method.

Declared In

SDataGridDelegate.h

shinobiDataGrid:shouldExpandSectionAtIndex:

Asks the delegate whether a section within the ShinobiDataGrid should be allowed to expand. This will only be called when a user taps the header of a currently collapsed section. It will not be called when a section is expanded programmatically.

- (BOOL)shinobiDataGrid:(ShinobiDataGrid *)grid shouldExpandSectionAtIndex:(NSUInteger)sectionIndex

Parameters

grid

The grid which contains the section which would like to expand

sectionIndex

The index of the section which would like to expand

Declared In

SDataGridDelegate.h

shinobiDataGrid:shouldSelectCellAtCoordinate:

Asks the delegate whether a currently unselected cell that has been tapped should be marked as selected.

- (BOOL)shinobiDataGrid:(ShinobiDataGrid *)grid shouldSelectCellAtCoordinate:(const SDataGridCoord *)gridCoordinate

Parameters

grid

The grid which contains the cell in question.

gridCoordinate

The coordinate of the cell in question.

Discussion

This can be used to control selection on a cell by cell basis.

Declared In

SDataGridDelegate.h

shinobiDataGrid:shouldSelectRow:

Asks the delegate whether the indicated row should be marked as selected as the result of a tap gesture on a cell.

- (BOOL)shinobiDataGrid:(ShinobiDataGrid *)grid shouldSelectRow:(SDataGridRow *)row

Parameters

grid

The grid which contains the row in question.

row

The row which may or may not be selected depending on the return value.

Return Value

A BOOL that indicates if row should be marked as selected.

Discussion

This method can only be called if the grid’s cellSelectionMode is set to SDataGridSelectionModeRowSingle or SDataGridSelectionModeRowMulti. Note that the cell selection/deselection delegate methods will be called after this method.

Declared In

SDataGridDelegate.h

shinobiDataGrid:styleForHorizontalGridLineAtIndex:inSection:

Asks the delegate for the style to be used for a particular horizontal gridline within the ShinobiDataGrid object.

- (SDataGridLineStyle *)shinobiDataGrid:(ShinobiDataGrid *)grid styleForHorizontalGridLineAtIndex:(NSInteger)gridLineIndex inSection:(NSInteger)sectionIndex

Parameters

grid

The grid that is requesting the horizontal gridline style.

gridLineIndex

The horizontal gridline for the section within grid that is requesting the style.

sectionIndex

The section that the horizontal gridline belongs to.

Return Value

The SDataGridLineStyle object representing the style that will be applied to the gridline at gridLineIndex with orientation.

Discussion

Gridlines are zero indexed - where the first horizontal grid line for a section appears underneath the first row of a section. Note that horizontal gridlines are zero-indexed within sections (that is to say that the first gridline in any section has a gridLineIndex of 0). The last row of a section also has a gridline appear underneath it (unlike the last column of a grid). Returning nil for a particular gridline will result in the defaultGridLineStyle property of your ShinobiDataGrid object being applied.

Declared In

SDataGridDelegate.h

shinobiDataGrid:styleForSectionHeaderAtIndex:

Asks the delegate for the style to be used for a particular sections header.

- (SDataGridSectionHeaderStyle *)shinobiDataGrid:(ShinobiDataGrid *)grid styleForSectionHeaderAtIndex:(NSInteger)sectionIndex

Parameters

grid

The grid which owns the section that is requesting the header style.

sectionIndex

The index of the section that is requesting the header style.

Return Value

An object representing the style that will be applied to the section at sectionIndex of grid.

Discussion

Use this method if you wish to specify different styles for each section header. If you wish to style all section headers uniformly then use the defaultSectionHeaderStyle property of your ShinobiDataGrid object for better performance. Section headers are zero-indexed.

Declared In

SDataGridDelegate.h

shinobiDataGrid:styleForVerticalGridLineAtIndex:

Asks the delegate for the style to be used for a particular vertical gridline within the ShinobiDataGrid object.

- (SDataGridLineStyle *)shinobiDataGrid:(ShinobiDataGrid *)grid styleForVerticalGridLineAtIndex:(NSInteger)gridLineIndex

Parameters

grid

The grid that is requesting the vertical gridline style.

gridLineIndex

The vertical gridline within grid that is requesting the style.

Return Value

The SDataGridLineStyle object representing the style that will be applied to the gridline at gridLineIndex with orientation.

Discussion

Gridlines are zero indexed - where the first vertical grid line appears to the right of the first column of cells. Returning nil for a particular gridline will result in the defaultGridLineStyle property of your ShinobiDataGrid object being applied.

Declared In

SDataGridDelegate.h

shinobiDataGrid:widthForResizingColumn:withCurrentWidth:targetWidth:

Asks the grid for the width that a column that is currently being resized should be set to.

- (NSNumber *)shinobiDataGrid:(ShinobiDataGrid *)grid widthForResizingColumn:(SDataGridColumn *)column withCurrentWidth:(CGFloat)currentWidth targetWidth:(CGFloat)targetWidth

Parameters

grid

The grid requesting the width for the resizing column.

column

The column that is being resized.

currentWidth

The current width of the resizing column.

targetWidth

The width that the resizing column will be set to if this method had not been implemented (or nil is returned from this method).

Return Value

An NSNumber object that represents the width that the resizing column will be set to. Return nil if you wish for the target width to be set.

Declared In

SDataGridDelegate.h

shinobiDataGrid:willBeginEditingCellAtCoordinate:

Tells the delegate that a cell within the ShinobiDataGrid grid object will begin editing.

- (void)shinobiDataGrid:(ShinobiDataGrid *)grid willBeginEditingCellAtCoordinate:(const SDataGridCoord *)coordinate

Parameters

grid

The grid which contains the cell that will begin editing.

coordinate

The coordinate of the cell within grid that will begin editing.

Declared In

SDataGridDelegate.h

shinobiDataGrid:willChangeSortOrderForColumn:to:

Informs the delegate that a column is about to change its sortOrder as a result of a user’s tap gesture on said column’s header cell.

- (void)shinobiDataGrid:(ShinobiDataGrid *)grid willChangeSortOrderForColumn:(SDataGridColumn *)column to:(SDataGridColumnSortOrder)newSortOrder

Parameters

grid

The grid that the column in question belongs to.

column

The column that is about to have its sortOrder changed.

newSortOrder

The sort order that column is about to have its sortOrder changed to.

Declared In

SDataGridDelegate.h

shinobiDataGrid:willCollapseSectionAtIndex:

Tells the delegate that a section within the ShinobiDataGrid object is about to be collapsed.

- (void)shinobiDataGrid:(ShinobiDataGrid *)grid willCollapseSectionAtIndex:(NSUInteger)sectionIndex

Parameters

grid

The grid which contains the section that is about to collapse.

sectionIndex

The index of the section that is about to collapse.

Declared In

SDataGridDelegate.h

shinobiDataGrid:willDeselectCellAtCoordinate:

Tells the delegate that a cell within the ShinobiDataGrid object is about to be deselected.

- (void)shinobiDataGrid:(ShinobiDataGrid *)grid willDeselectCellAtCoordinate:(const SDataGridCoord *)gridCoordinate

Parameters

grid

The grid containing the cell that will be deselected.

gridCoordinate

The coordinate of the cell that is about to be deselected.

Declared In

SDataGridDelegate.h

shinobiDataGrid:willDeselectRow:

Informs the delegate that the deselection of an entire row is about to happen as a result of the user having tapped a cell.

- (void)shinobiDataGrid:(ShinobiDataGrid *)grid willDeselectRow:(SDataGridRow *)row

Parameters

grid

The grid that is about to have a row set as deselected.

row

The row that is about to be deselected.

Discussion

Note that cellSelectionMode must be set to SDataGridSelectionModeRowSingle or SDataGridSelectionModeRowMulti for this delegate method to be called and that the cell selection delegate methods such as shinobiGrid:didSelectCellAtCoordinate: will be called after this method.

Declared In

SDataGridDelegate.h

shinobiDataGrid:willEndReorderingColumn:

Informs the delegate that the specified column is about to complete reordering

- (void)shinobiDataGrid:(ShinobiDataGrid *)grid willEndReorderingColumn:(SDataGridColumn *)column

Parameters

grid

The datagrid which contains the column

column

The column which is about to be dropped

Discussion

This is called when the user’s drag gesture has been completed.

Declared In

SDataGridDelegate.h

shinobiDataGrid:willEndReorderingRow:

Informs the delegate that the specified row is about to complete reordering

- (void)shinobiDataGrid:(ShinobiDataGrid *)grid willEndReorderingRow:(SDataGridRow *)row

Parameters

grid

The datagrid which contains the row

row

The row which is about to be dropped

Discussion

This is called when the user’s drag gesture has been completed.

Declared In

SDataGridDelegate.h

shinobiDataGrid:willEndResizingColumn:fromWidth:toWidth:

Tells the delegate that a column is about to end resizing a column

- (void)shinobiDataGrid:(ShinobiDataGrid *)grid willEndResizingColumn:(SDataGridColumn *)column fromWidth:(CGFloat)oldWidth toWidth:(CGFloat)newWidth

Parameters

grid

The grid containing the column that has been resized.

column

The column that has been resized.

oldWidth

The width that the column used to be before the resize.

newWidth

The width that the column now has.

Discussion

This method is called once the user’s pinch gesture has been completed.

Declared In

SDataGridDelegate.h

shinobiDataGrid:willExpandSectionAtIndex:

Tells the delegate that a section within the ShinobiDataGrid object is about to be expanded.

- (void)shinobiDataGrid:(ShinobiDataGrid *)grid willExpandSectionAtIndex:(NSUInteger)sectionIndex

Parameters

grid

The grid which contains the section that is about to expand.

sectionIndex

The index of the section that is about to expand.

Declared In

SDataGridDelegate.h

shinobiDataGrid:willSelectCellAtCoordinate:

Tells the delegate that a cell within the ShinobiDataGrid object has been selected.

- (void)shinobiDataGrid:(ShinobiDataGrid *)grid willSelectCellAtCoordinate:(const SDataGridCoord *)gridCoordinate

Parameters

grid

The grid which contains the cell that has been selected.

gridCoordinate

The coordinate of the cell that has been selected.

Declared In

SDataGridDelegate.h

shinobiDataGrid:willSelectRow:

Informs the delegate that the selection of an entire row is about to happen as a result of the user having tapped a cell.

- (void)shinobiDataGrid:(ShinobiDataGrid *)grid willSelectRow:(SDataGridRow *)row

Parameters

grid

The grid that is about to have a row set as selected.

row

The row that is about to be selected.

Discussion

Note that cellSelectionMode must be set to SDataGridSelectionModeRowSingle or SDataGridSelectionModeRowMulti for this delegate method to be called and that the cell selection delegate methods such as shinobiDataGrid:didSelectCellAtCoordinate: will be called before this method.

Declared In

SDataGridDelegate.h