A row of the grid can act as a section?



a row of the grid can act as a section?

pressing twice on the row, display a subset of rows, as if it were a section

thanks, Salvador.


Hi Salvador,

Probably the easiest way to approach this would be to make a section header look like a row in the grid. The SDataGridDataSource protocol contains the following method which will allow you to do this:

/** Asks the data source for a view for the movable portion of header of the specified section of the ShinobiDataGrid object.
 If you do not implement this method, the shinobiGrid:titleForHeaderInSection: delegate method is used as a fallback.
 Returning nil will also cause the title method to be used.
 The frame parameter specifies the header's bounds, which you can use to size your view appropriately
- (UIView *)shinobiDataGrid:(ShinobiDataGrid *)grid viewForHeaderInSection:(NSInteger)section inFrame:(CGRect)frame;

The advantage of this approach is that you get the behaviour you want for free. The main area in which you’ll need to put in effort is in making the section header view look like a normal grid row.

I hope that helps!