Shinobi Grids - Monotouch : How to make the row auto resizable based on the content inside?


#1

Hello, 

I just started looking Shinobi Grids trial version. Based on the requirements for our application, we need to have the property to set the row height based on the custom content inside. Is it possible to do that? If yes, which method I need to use. Related to the same topic, is it possible to set the column width auto resizable?

Wating for the reply.

Thanks.


#2

Hey,

The row height is automatically set to fit as many rows on the screen as possible, with a minimum row height of 30 points. However, it is possible to alter the row height based on the custom content inside. To do this you would need to implement the GetRowStyle method on your SGridDelegate and return a SGridColRowStyle object with the size property set appropriately for the content.

As for the columns, if by auto resizable you mean based off the content width, you do this using the same method as above but instead by implementing the GetColStyle method on your SGridDelegate. Also, you can set a property on the grid to allow the columns to be resizable by the user, using a pinch gesture.

I hope this helps you!

Jan


#3

Hi i have same problem using xamarin grid component, but i can’t find ‘GetColStyle’ in ‘SDataGridDelegate’ as you said. Is implemented in monotouch?

Could you past sample code?