ShinobiGrids 2.0 – Top Release Tips

Written by Stuart Grey

Jesse has already updated you on our latest grids release and some of the fantastic new features on offer. We’re really excited about our new ShinobiDataGrid offering and that’s where top-tips focuses this time.  Here’s a 5 minute overview of what it really means for those wanting to migrate from the grid to the brand new ShinobiDataGrid.

Why would I make the move?

We listened to a lot of feedback and we really think this new API provides a better way for the majority of people to get their data into the grid and organized. There will still be plenty of opportunity to use the original (and improved) grid if you’re interested in unlimited columns, but most of the time we think the ShinobiDataGrid will work great. The data-grid also offers sorting and much more opportunity for styling, etc. 

How much work is involved?

We have a great quickstart quide and an abundance of samples in the zip bundle you download. There is also a detailed user guide available alongside the API docs – check out the How To section. Here are the key differences for existing grids users who are looking to make the switch:

  • You now define your columns on the ShinobiDataGrid when you’re configuring its properties. Add column objects to define the type of data in each column and it will automatically have a header.
SDataGridColumn* ageColumn = [[SDataGridColumn alloc] initWithTitle:@"Age"];
ageColumn.width = @200;
[_shinobiDataGrid addColumn:ageColumn];


  • Cell pooling is handled by the ShinobiDataGrid internally based on your column configuration. We now pass you a cell to the datasource method prepareCellForDisplay for you to populate.
- (void)shinobiDataGrid:(ShinobiDataGrid *)grid prepareCellForDisplay:(SDataGridCell *)cell
    // both columns use a SDataGridTextCell, so we are safe to perform this cast
    SDataGridTextCell* textCell = (SDataGridTextCell*)cell;


  • An optional datasource helper class simplifies getting data into the chart and configuring features such as sorting.
// create the helper
    _datasourceHelper = [[SDataGridDataSourceHelper alloc] initWithDataGrid:_shinobiDataGrid];
    // group by the 'surname-first-letter' property - which is a 'virtual' property. 
    _datasourceHelper.groupedPropertyKey = @"surname-first-letter";
    _datasourceHelper.groupedPropertySortOrder = SDataGridColumnSortOrderAscending;
    // set the delegate for the helper
    _datasourceHelper.delegate = self;
    // finally - supply the data to the helper = _data;


There are many new features that you can discover through our detailed documentation and samples – but these are the key changes when making the switch from grids. Simple and well worth the change! 

Let us know what you think!

We hope you really enjoy using the new data-grid and we look forward to seeing your creations! As ever, do check out the ShinobiDeveloper section and don’t hesitate to get in touch!