NGridView Class Reference

Inherits from UIScrollView
Conforms to NGridSelectionDelegate
NGridTouchDelegate
UIScrollViewDelegate
Declared in NGridView.h

Overview

The NGridView class represents the main grid view you need to embed in your user interface.

Grid view supports:

  • multidimensional data sets;
  • data interaction;
  • themes and color customization;
  • selection;
  • column and row freezing;
  • column and row resizing;
  • data sort and filtering;
  • conditional formatting and growth indicators;
  • sparklines.

  licenseKey

License key for NGrid. You get it in email when download NGrid framework.

@property (nonatomic, retain) NSString *licenseKey

Discussion

License key must be set before using the NGrid.

Declared In

NGridView.h

  dataSource

Object used as the data source of the grid.

@property (nonatomic, assign) id<NGridDataSource> dataSource

Declared In

NGridView.h

  proxyDataSource

Proxy data source used to manage data from the data source.

@property (nonatomic, assign) id<NGridProxyDataSource> proxyDataSource

Discussion

Proxy data source responsible for sorting, filtering, highlighting etc. Data source (NGridDataSource) must be set in proxy.

Declared In

NGridView.h

  delegate

Grid delegate used to manage grid appearance and user interactions.

@property (nonatomic, assign) id<NGridDelegate> delegate

Declared In

NGridView.h

  resizer

Resizer object.

@property (nonatomic, readonly) NGridResizerArea *resizer

Declared In

NGridView.h

  multiselect

A Boolean value that determines whether the multiselect mode is ON.

@property (assign, getter=isMultiselect) BOOL multiselect

Discussion

In multiselect mode you can only selecting rows/columns by calling <selectRowByCell:> (<selectRowByKey:>) or <selectColumnByCell:> (<selectColumnByKey:>).

Declared In

NGridView.h

  dockable

A Boolean value that determines whether docking is enabled.

@property (assign) BOOL dockable

Discussion

If set to YES, grid view docks to nearest top/left row/column after scrolling.

Declared In

NGridView.h

  lastFrozenRowBorderColor

Color of the separator between frozen and not frozen rows.

@property (nonatomic, retain) UIColor *lastFrozenRowBorderColor

Declared In

NGridView.h

  lastFrozenRowBorderWidth

Width of the separator between frozen and not frozen rows.

@property (nonatomic, assign) CGFloat lastFrozenRowBorderWidth

Declared In

NGridView.h

  lastFrozenColumnBorderColor

Color of the separator between frozen and not frozen columns.

@property (nonatomic, retain) UIColor *lastFrozenColumnBorderColor

Declared In

NGridView.h

  lastFrozenColumnBorderWidth

Width of the separator between frozen and not frozen columns.

@property (nonatomic, assign) CGFloat lastFrozenColumnBorderWidth

Declared In

NGridView.h

  keepSelectionByIndex

A Boolean value that determines whether the selection keeps by indices.

@property (assign) BOOL keepSelectionByIndex

Discussion

If property set to YES then after data source update the selections stays in place, otherwise selection changes according to data source changes.

Declared In

NGridView.h

  selectionStyle

Style specifying the appearance of the grid selection.

@property (retain) NGridSelectionStyle *selectionStyle

Declared In

NGridView.h

  resizerStyle

Style specifying the appearance of the grid resizer.

@property (retain) NGridResizerStyle *resizerStyle

Declared In

NGridView.h

  autoresizeToFitGridFrameWidth

A Boolean value that determines whether content width adapts to frame width.

@property (assign) BOOL autoresizeToFitGridFrameWidth

Declared In

NGridView.h

  autoresizeToFitGridFrameHeight

A Boolean value that determines whether content height adapts to frame height.

@property (assign) BOOL autoresizeToFitGridFrameHeight

Declared In

NGridView.h

  finishEditingOnReloadData

A Boolean value that determines whether grid should finalize editing on reload data.

@property (assign) BOOL finishEditingOnReloadData

Declared In

NGridView.h

– dequeueReusableCellWithIdentifier:

Requests reusable cell with reusable id.

- (NGridCell *)dequeueReusableCellWithIdentifier:(NSString *)ID

Parameters

ID

This id used for search cells in cache.

Declared In

NGridView.h

– rowWithKey:

Returns specified row object.

- (NGridRow *)rowWithKey:(NSInteger)rowKey

Parameters

rowKey

Key of the row.

Declared In

NGridView.h

– columnWithKey:

Returns specified column object.

- (NGridColumn *)columnWithKey:(NSInteger)columnKey

Parameters

columnKey

Key of the column.

Declared In

NGridView.h

– headerRowWithKey:

Returns specified header row object.

- (NGridRow *)headerRowWithKey:(NSInteger)rowKey

Parameters

rowKey

Key of the row.

Declared In

NGridView.h

– headerColumnWithKey:

Returns specified header column object.

- (NGridColumn *)headerColumnWithKey:(NSInteger)columnKey

Parameters

columnKey

Key of the column.

Declared In

NGridView.h

– cellWithKey:

Returns specified cell.

- (NGridCell *)cellWithKey:(NGridCellKey *)cellKey

Parameters

cellKey

Key of the cell.

Declared In

NGridView.h

– reloadData

Updates grid after data source update.

- (void)reloadData

Declared In

NGridView.h

– showCellWithCoordinate:animated:

Scrolls current view rect to the grid point.

- (void)showCellWithCoordinate:(NGridCellCoordinate *)coordinate animated:(BOOL)animated

Parameters

coordinate

Coordinate of the grid view.

animated

YES if you want to animate changing of the grid view position.

Declared In

NGridView.h

– selectionAreaForRowWithKey:

Returns selection area of the specified row.

- (NGridSelectionArea *)selectionAreaForRowWithKey:(NSInteger)rowKey

Parameters

rowKey

Key of the row.

Declared In

NGridView.h

– selectionAreaForColumnWithKey:

Returns selection area of the specified column.

- (NGridSelectionArea *)selectionAreaForColumnWithKey:(NSInteger)columnKey

Parameters

columnKey

Key of the column.

Declared In

NGridView.h

– beginResizeWithCell:

Starts resizing based on the cell.

- (void)beginResizeWithCell:(NGridCell *)cell

Parameters

cell

Cell in the grid view.

Declared In

NGridView.h

– beginResizeColumnWithCornerCell:

Starts column resizing based on the cell.

- (void)beginResizeColumnWithCornerCell:(NGridCell *)cell

Parameters

cell

Corner cell in the grid view.

Declared In

NGridView.h

– beginResizeRowWithCornerCell:

Starts row resizing based on the cell.

- (void)beginResizeRowWithCornerCell:(NGridCell *)cell

Parameters

cell

Corner cell in the grid view.

Declared In

NGridView.h

– finishResize

Finishes resizing.

- (void)finishResize

Declared In

NGridView.h

– insertRowsWithKeys:

Inserts the rows with the specified keys.

- (void)insertRowsWithKeys:(NSArray *)keys

Parameters

keys

The keys of the new rows to be inserted.

Declared In

NGridView.h

– removeRowsWithKeys:

Removes the rows with the specified keys.

- (void)removeRowsWithKeys:(NSArray *)keys

Parameters

keys

An array containing the row keys to remove.

Declared In

NGridView.h

– insertColumnsWithKeys:

Inserts the columns with the specified keys.

- (void)insertColumnsWithKeys:(NSArray *)keys

Parameters

keys

The keys of the new rows to be inserted.

Declared In

NGridView.h

– removeColumnsWithKeys:

Removes the columns with the specified keys.

- (void)removeColumnsWithKeys:(NSArray *)keys

Parameters

keys

An array containing the column keys to remove.

Declared In

NGridView.h

– beginUpdates

Begin a series of method calls that change data source state.

- (void)beginUpdates

Declared In

NGridView.h

– endUpdates

Conclude a series of method calls that change data source state.

- (void)endUpdates

Declared In

NGridView.h

  isRightToLeft

Flag determining if NGrid works in right-to-left mode (YES) or left-to-right mode (NO). The default value is NO.

@property (nonatomic, assign) BOOL isRightToLeft

Declared In

NGridView.h

  expandUsingExpanderIcon

A Boolean value indicating whether the grid view allows the user to expand/collapse columns or rows using expander icon.

@property (assign) BOOL expandUsingExpanderIcon

Declared In

NGridView.h

– expandAllRows

Expands all rows in the grid view.

- (void)expandAllRows

Declared In

NGridView.h

– collapseAllRows

Collapses all rows in the grid view.

- (void)collapseAllRows

Declared In

NGridView.h

– expandAllColumns

Expands all columns in the grid view.

- (void)expandAllColumns

Declared In

NGridView.h

– collapseAllColumns

Collapses all columns in the grid view.

- (void)collapseAllColumns

Declared In

NGridView.h

– expandRowWithCoordinate:

Prepares data source to expand the row with key.

- (void)expandRowWithCoordinate:(NSInteger)rowCoordinate

Parameters

rowCoordinate

Coordinate of the row to expand.

Declared In

NGridView.h

– collapseRowWithCoordinate:

Collapses the row with key.

- (void)collapseRowWithCoordinate:(NSInteger)rowCoordinate

Parameters

rowCoordinate

Coordinate of the row to collapse.

Declared In

NGridView.h

– expandColumnWithCoordinate:

Expands the column with key.

- (void)expandColumnWithCoordinate:(NSInteger)columnCoordinate

Parameters

columnCoordinate

Coordinate of the column to expand.

Declared In

NGridView.h

– collapseColumnWithCoordinate:

Collapses the column with key.

- (void)collapseColumnWithCoordinate:(NSInteger)columnCoordinate

Parameters

columnCoordinate

Coordinate of the column to collapse.

Declared In

NGridView.h

– isRowWithKeyExpanded:

Returns a Boolean value indicating whether the row is expanded.

- (BOOL)isRowWithKeyExpanded:(NSInteger)rowKey

Parameters

rowKey

Key of the row.

Declared In

NGridView.h

– isColumnWithKeyExpanded:

Returns a Boolean value indicating whether the column is expanded.

- (BOOL)isColumnWithKeyExpanded:(NSInteger)columnKey

Parameters

columnKey

Key of the column.

Declared In

NGridView.h

– isRowSparklinesShown

Returns the row sparkline visibility.

- (BOOL)isRowSparklinesShown

Declared In

NGridView.h

– isColumnSparklinesShown

Returns the column sparkline visibility.

- (BOOL)isColumnSparklinesShown

Declared In

NGridView.h

– setRowSparklinesShown:

Sets the row sparkline visibility.

- (void)setRowSparklinesShown:(BOOL)isShown

Parameters

isShown

YES if you want to show the row sparklines.

Declared In

NGridView.h

– setColumnSparklinesShown:

Sets the column sparkline visibility.

- (void)setColumnSparklinesShown:(BOOL)isShown

Parameters

isShown

YES if you want to show the column sparklines.

Declared In

NGridView.h

– isRowCanBeFreezed:

Returns a Boolean value indicating whether the specified row can be freezed.

- (BOOL)isRowCanBeFreezed:(NSInteger)rowKey

Parameters

rowKey

Key of the row to freeze.

Declared In

NGridView.h

– isColumnCanBeFreezed:

Returns a Boolean value indicating whether the specified column can be freezed.

- (BOOL)isColumnCanBeFreezed:(NSInteger)columnKey

Parameters

columnKey

Key of the column to freeze.

Declared In

NGridView.h

– freezeRowWithKey:

Freezes row by key.

- (void)freezeRowWithKey:(NSInteger)rowKey

Parameters

rowKey

Key of the row to freeze.

Declared In

NGridView.h

– freezeColumnWithKey:

Freezes column by key.

- (void)freezeColumnWithKey:(NSInteger)columnKey

Parameters

columnKey

Key of the column to freeze.

Declared In

NGridView.h

– freezeRowWithKey:toIndex:

Freezes row by key.

- (void)freezeRowWithKey:(NSInteger)rowKey toIndex:(NSInteger)index

Parameters

rowKey

Key of the row to freeze.

index

Specified the index of frozen row.

Declared In

NGridView.h

– freezeColumnWithKey:toIndex:

Freezes column by key.

- (void)freezeColumnWithKey:(NSInteger)columnKey toIndex:(NSInteger)index

Parameters

columnKey

Key of the column to freeze.

index

Specified the index of frozen column.

Declared In

NGridView.h

– unfreezeRowWithKey:

Unfreezes row by key.

- (void)unfreezeRowWithKey:(NSInteger)rowKey

Parameters

rowKey

Key of the row to unfreeze.

Declared In

NGridView.h

– unfreezeColumnWithKey:

Unfreezes column by key.

- (void)unfreezeColumnWithKey:(NSInteger)columnKey

Parameters

columnKey

Key of the column to unfreeze.

Declared In

NGridView.h

– isRowWithKeyFrozen:

Checks if the row with key is frozen.

- (BOOL)isRowWithKeyFrozen:(NSInteger)rowKey

Parameters

rowKey

Key of the row.

Declared In

NGridView.h

– isColumnWithKeyFrozen:

Checks if the column with key is frozen.

- (BOOL)isColumnWithKeyFrozen:(NSInteger)columnKey

Parameters

columnKey

Key of the column.

Declared In

NGridView.h

– setSortSettings:

Sets the sort settings.

- (void)setSortSettings:(id<NGridSortSettingsProtocol>)settings

Parameters

settings

Sort settings.

Declared In

NGridView.h

– sortSettings

Returns the sort settings.

- (id<NGridSortSettingsProtocol>)sortSettings

Declared In

NGridView.h

– removeSortSettings

Removes the sort settings.

- (void)removeSortSettings

Declared In

NGridView.h

– setFilterSettings:

Sets the filter settings.

- (void)setFilterSettings:(id<NGridFilterSettingsProtocol>)settings

Parameters

settings

Filter settings.

Declared In

NGridView.h

– filterSettings

Returns the filter settings.

- (id<NGridFilterSettingsProtocol>)filterSettings

Declared In

NGridView.h

– removeFilterSettings

Removes the filter settings.

- (void)removeFilterSettings

Declared In

NGridView.h

– setHighlightSettings:

Sets the highlight settings.

- (void)setHighlightSettings:(id<NGridHighlightSettingsProtocol>)settings

Parameters

settings

Highlight settings.

Declared In

NGridView.h

– highlightSettings

Returns the highlight settings.

- (id<NGridHighlightSettingsProtocol>)highlightSettings

Declared In

NGridView.h

– removeHighlightSettings

Removes the highlight settings.

- (void)removeHighlightSettings

Declared In

NGridView.h

  selectionAreaShouldPassTouchesThrough

A Boolean value that determines whether the selection areas should pass all touches through except touches on balloons.

@property (assign) BOOL selectionAreaShouldPassTouchesThrough

Declared In

NGridView.h

– clearSelection

Clears current selection.

- (void)clearSelection

Declared In

NGridView.h

– selectAll

Selects all cells in the grid view.

- (void)selectAll

Declared In

NGridView.h

– selectRowWithKey:

Selects all cells in the row with key.

- (void)selectRowWithKey:(NSInteger)rowKey

Parameters

rowKey

Key of the row to select.

Declared In

NGridView.h

– selectColumnWithKey:

Selects all cells in the column with key.

- (void)selectColumnWithKey:(NSInteger)columnKey

Parameters

columnKey

Key of the column to select.

Declared In

NGridView.h

– selectCellWithKey:

Selects specified cell.

- (void)selectCellWithKey:(NGridCellKey *)cellKey

Parameters

cellKey

Key of the cell to select.

Declared In

NGridView.h

– isRowWithKeySelected:

Checks row for selection.

- (BOOL)isRowWithKeySelected:(NSInteger)rowKey

Parameters

rowKey

Key of the row to test for selection.

Declared In

NGridView.h

– isColumnWithKeySelected:

Checks column for selection.

- (BOOL)isColumnWithKeySelected:(NSInteger)columnKey

Parameters

columnKey

Key of the column to test for selection.

Declared In

NGridView.h

– deselectRowWithKey:

Deselects row with key.

- (void)deselectRowWithKey:(NSInteger)rowKey

Parameters

rowKey

Key of the row to deselect.

Declared In

NGridView.h

– deselectColumnWithKey:

Deselects column with key.

- (void)deselectColumnWithKey:(NSInteger)columnKey

Parameters

columnKey

Key of the column to deselect.

Declared In

NGridView.h

– selectedRows

Return all currently selected rows.

- (NSSet *)selectedRows

Declared In

NGridView.h

– selectedColumns

Return all currently selected columns.

- (NSSet *)selectedColumns

Declared In

NGridView.h

– deselectRows:andColumns:

Deselects rows and columns from arrays.

- (void)deselectRows:(NSArray *)rows andColumns:(NSArray *)columns

Parameters

rows

Array with the row keys.

columns

Array with the column keys.

Declared In

NGridView.h

– beginEditingCellWithKey:

Starts editing the specified cell.

- (void)beginEditingCellWithKey:(NGridCellKey *)cellKey

Parameters

cellKey

Key of the cell.

Declared In

NGridView.h

– finishEditing

Finishes editing.

- (void)finishEditing

Declared In

NGridView.h

– resizeToFitContent

Resizes all rows and columns to fit content.

- (void)resizeToFitContent

Declared In

NGridView.h

– resizeToFitContentUsingSettings:

Resizes rows and columns to fit content based on specified settings.

- (void)resizeToFitContentUsingSettings:(NGridAutoresizeSettings *)settings

Parameters

settings

Resize settings.

Declared In

NGridView.h