HeaderCellStyle padding not working SDataGridColumn


I have an app I’m updating to the newest version of the ShinobiDatagrids - shinobigrids-standard-2.7.2.hotfix1-2.dmg.zip to fix a problem with section headers showing correctly in iOS 8.  In the previous version (I don’t remember which one it was but it was probably from at least 6 months ago maybe longer) I could set the columnInsert on the header style like this:

UIEdgeInserts padding = UIEdgeInsetsMake(10, 5, 10, 32);

columnStyle = tempColumn.headerCellStyle;

columnStyle.font = [UIFont boldSystemFontOfSize:14];

columnStyle.textAlignment = NSTextAlignmentRight;

columnStyle.contentInset = padding;

tempColumn.headerCellStyle = columnStyle;

[grid addColumn:tempColumn];

And it worked fine, the 32 padding on the right hand side made sure that the text didn’t overlap the up and down arrows when I had sorting turned on.  In the new version, though, it doesn’t seem to “take” no matter what I put in that field.  Anyone have an idea as to what might be causing the issue?



Hi SiB57,

It looks to me as though the individual header column style is being overridden by the default header column style. If you do the following you get a content inset applied correctly.

_grid.defaultCellStyleForHeaderRow.contentInset = ...;

This will apply the content inset to every single column’s header though, and I understand that this may not be what you’re looking for. We’ll look into getting a fix for this out to you, but in the meanwhile, you could subclass the header cell type you are using, and set the frames of its subviews directly in layout subviews.

Jan Akerman


Great, thanks for the update!


Hi - we’ve just released a fix for this issue. If you log into the customer portal, you’ll want to download version 2.7.2.hotfix2. Unfortunately, trial users will have to wait until our next minor release for the fix, as ‘hot fix’ releases are intermediary releases that are pushed out to existing customers only.

Best regards,
Jan Akerman