Zhao Xiang Zhao Xiang - 5 months ago 24
iOS Question

How to display and input large amount data in a datagrid-like table on iPhone

I am working on a iPhone based MIS, I need to make a table to show large amount of data from core data, edit some of them, then save them. The table could have tens of columns and hundreds of rows.

So it's there anything like the datagrid in ASP.NET on iPhone? If not, how can I input lots of data in a table?

lxt lxt

So a UIScrollView is designed to display content of an arbitrary width/height, and a UITableView provides an interface through which you can display a table of arbitrary length. UITableView is a subclass of UIScrollView. It's a good starting point - even if you end up not using the class itself and implementating your own version - because it will show you the right approach to view recycling.

There is no in-built class for displaying a 'spreadsheet', which I assume is what you're after. So you'll either need to roll your own from scratch, or see if you can hack/modify a UITableView enough to give you what you want. You may want to look at some of the existing spreadsheet apps for hints/clues as to how they've achieved it. I'm sorry to say there's no simple way within iOS to do what you're after, so be prepared for some work!