NGridDataSource Protocol Reference
| Conforms to | NSObject |
|---|---|
| Declared in | NGridDataSource.h |
Overview
The NGridDataSource protocol defines methods that should be implemented to provide the grid data.
– gridView:cellWithKey:
required method
Asks the data source to return the cell by key.
- (NGridCell *)gridView:(NGridView *)gridView cellWithKey:(NGridCellKey *)cellKeyParameters
gridView |
Grid view that requests the cell. |
|---|---|
cellKey |
Key of the needed cell. |
Declared In
NGridDataSource.h
– gridView:valueForCellWithKey:
required method
Asks the data source to return the cell value by the cell key.
- (NSObject *)gridView:(NGridView *)gridView valueForCellWithKey:(NGridCellKey *)cellKeyParameters
gridView |
Grid view that requests the cell. |
|---|---|
cellKey |
Key of the needed cell. |
Declared In
NGridDataSource.h
– gridViewRowCount:
required method
Asks the data source to return the number of the rows.
- (NSInteger)gridViewRowCount:(NGridView *)gridViewParameters
gridView |
Related grid view object. |
|---|
Declared In
NGridDataSource.h
– gridViewColumnCount:
required method
Asks the data source to return the number of the columns.
- (NSInteger)gridViewColumnCount:(NGridView *)gridViewParameters
gridView |
Related grid view object. |
|---|
Declared In
NGridDataSource.h
– gridViewRowHeaderCount:
required method
Asks the data source to return the number of the row headers.
- (NSInteger)gridViewRowHeaderCount:(NGridView *)gridViewParameters
gridView |
Related grid view object. |
|---|
Declared In
NGridDataSource.h
– gridViewColumnHeaderCount:
required method
Asks the data source to return the number of the column headers.
- (NSInteger)gridViewColumnHeaderCount:(NGridView *)gridViewParameters
gridView |
Related grid view object. |
|---|
Declared In
NGridDataSource.h
– gridView:indentForCellWithKey:
Asks the data source to return the cell text indentation.
- (NSInteger)gridView:(NGridView *)gridView indentForCellWithKey:(NGridCellKey *)cellKeyParameters
gridView |
Grid view that requests cell. |
|---|---|
cellKey |
Key of the needed cell. |
Declared In
NGridDataSource.h
– gridView:parentRowKeyForRowWithKey:
Asks the data source to return the key of the row which is a parent for the specified one.
- (NSInteger)gridView:(NGridView *)gridView parentRowKeyForRowWithKey:(NSInteger)rowKeyParameters
gridView |
Related grid view object. |
|---|---|
rowKey |
Key of the row. |
Declared In
NGridDataSource.h
– gridView:parentColumnKeyForColumnWithKey:
Asks the data source to return the key of the column which is a parent for the specified one.
- (NSInteger)gridView:(NGridView *)gridView parentColumnKeyForColumnWithKey:(NSInteger)columnKeyParameters
gridView |
Related grid view object. |
|---|---|
columnKey |
Key of the column. |
Declared In
NGridDataSource.h
– cellUnionSetForGridView:
Asks the data source to return union set for grid view.
- (NGridCellUnionSet *)cellUnionSetForGridView:(NGridView *)gridViewParameters
gridView |
Related grid view object. |
|---|
Declared In
NGridDataSource.h
– gridViewCanSelectRowsAndColumns:
Asks the data source whether selection is allowed. Return YES to allow selection in the grid.
- (BOOL)gridViewCanSelectRowsAndColumns:(NGridView *)gridViewParameters
gridView |
Related grid view object. |
|---|
Declared In
NGridDataSource.h
– gridView:setValue:forCellWithKey:
Asks the data source to set the value by the cell key.
- (void)gridView:(NGridView *)gridView setValue:(NSObject *)value forCellWithKey:(NGridCellKey *)cellKeyParameters
gridView |
Related grid view object. |
|---|---|
value |
Value for cell. |
cellKey |
Key of the cell. |
Declared In
NGridDataSource.h
– gridView:rowWithKeyIsSection:
Asks the data source whether specified row is section.
- (BOOL)gridView:(NGridView *)gridView rowWithKeyIsSection:(NSInteger)rowKeyParameters
gridView |
Related grid view object. |
|---|---|
rowKey |
Key of the row. |
Declared In
NGridDataSource.h
– gridView:columnWithKeyIsSection:
Asks the data source whether specified column is section.
- (BOOL)gridView:(NGridView *)gridView columnWithKeyIsSection:(NSInteger)columnKeyParameters
gridView |
Related grid view object. |
|---|---|
columnKey |
Key of the column. |
Declared In
NGridDataSource.h
– compareCellValue:toCellValue:caseInsensitive:
Compare two cell values. This method is called when the grid is being sorted to compare the pairs of cell values.
- (NSComparisonResult)compareCellValue:(NSObject *)cellVal1 toCellValue:(NSObject *)cellVal2 caseInsensitive:(BOOL)caseInsensitiveParameters
cellVal1 |
|
|---|---|
cellVal2 |
|
caseInsensitive |
|
Return Value
comparison result.
Declared In
NGridDataSource.h