DataGrid : Problem in numberOfRowsInSection


Hi all,

I’m encountering a strange behaviour in numberOfRowsInSection.

If I change the number of rows of a section, the Grid keep asking me the old number of cells.

Example: my section has 5 rows.

I reload the data and now the section has 3 rows.

In prepare for cell, the asked row index passes beyond 3, asking for fourth row!

Any Hint?

We are stucked at the moment!

Thanks in advance,



Hi Davide,

How are you reloading your grid? Are you calling [grid reload] or are you reloading a certain set of rows [grid reloadRows:rows]?

We’re not aware of this issue, have you managed to replicate it in one of our sample apps?

Best regards,


Hi Jan,

i’m reloading the whole grid with [grid reload] in order to change the numberOfRowsInSection.



Hi Isis,

I took our GettingStarted sample and added a button that reloaded it with different row numbers (10 and 20 rows). Each time I reloaded it, it queried the datasource for the correct number of rows. Have you managed to replicate this issue in one of our samples? Perhaps you could send us a sample that replicates it? (Send any samples to and refer to this post!)

Jan Akerman