Change the height for the shinobi grid row


#1

Hi everybody,

I have a problem while changing the height for the shinobi grid row … I assign a height but with no effect (the new value does not applied)

Here what I did:

In the class : [CustomDataSource : NSObject<SGridDataSource, SGridDelegate>]

- (SGridColRowStyle *)shinobiGrid:(ShinobiGrid *)grd styleForRowAtIndex:(int)rowIndex inSection:(int) sectionIndex{
    SGridColRowStyle *style = [super shinobiGrid:grd styleForRowAtIndex:rowIndex inSection:sectionIndex];
    style.size = [NSNumber numberWithInt:15];
    return style;
}

//and I added this also

self.grid.defaultRowStyle.size = [NSNumber numberWithInt:15];

// where self is an instance of CustomDataSource

#2

Hi ssaeed84,

I see nodboy has responded to this issue yet so thought I’d make a suggestion. The way that you are setting the heights looks correct, but I notice that the values you are using are relatively small. This makes me wonder if the minimum row height is being used instead. You can test this by setting something like:

_grid.defaultRowStyle.minimumSize = @(1);

I think the minimum row height might be higher than the value you are trying to set, so changing this minimum will hopefully help.

Thanks

Ryan


#3

It works… Thank you v.MUCH  :laughing: :laughing: :laughing: :laughing: :grin: