Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Status
Not open for further replies.

mikezang

macrumors 6502a
Original poster
May 22, 2010
939
41
Tokyo, Japan
I have a Excel file to manage my stock trading.

I want to port it to iPad, of course not all Excel functions, just have a GridView to show my stock data like in Excel, where can I find a GridView? is the TableView in iPad also a GridView?
 
I'm looking for this as well.
Some of the approaches I've seen mentioned include:

1. AQGridView
2. DTGridView
3. Create your own UITableViewCell with multiple columns. Some references said it was relatively easy...

I've seen most references for AQGridView. Is that considered the best and simplest approach?
 
I'm looking for this as well.
Some of the approaches I've seen mentioned include:

1. AQGridView
2. DTGridView
3. Create your own UITableViewCell with multiple columns. Some references said it was relatively easy...

I've seen most references for AQGridView. Is that considered the best and simplest approach?
I make a custom table cell, now I can get a Excel Format table.
 
Is there sample code around to do that? Book or project or blog post?
Make a customer TableCell and TableView
Code:
#import <UIKit/UIKit.h>
@interface TradeCell : UITableViewCell {
	UILabel *labelStartDate;
	UILabel *labelEndDate;
	UILabel *labelTradeType;
	UILabel *labelCode;
	UILabel *labelAmount;
	UILabel *labelStartPrice;
	UILabel *labelEndPrice;
	UILabel *labelPosition;
	UILabel *labelProfitLoss;
	UILabel *labelProfitLossRate;
	UILabel *labelFee;
	UILabel *labelTax;
	UILabel *labelInterest;
}
@property (nonatomic, retain) IBOutlet UILabel *labelStartDate;
@property (nonatomic, retain) IBOutlet UILabel *labelEndDate;
@property (nonatomic, retain) IBOutlet UILabel *labelTradeType;
@property (nonatomic, retain) IBOutlet UILabel *labelCode;
@property (nonatomic, retain) IBOutlet UILabel *labelAmount;
@property (nonatomic, retain) IBOutlet UILabel *labelStartPrice;
@property (nonatomic, retain) IBOutlet UILabel *labelEndPrice;
@property (nonatomic, retain) IBOutlet UILabel *labelPosition;
@property (nonatomic, retain) IBOutlet UILabel *labelProfitLoss;
@property (nonatomic, retain) IBOutlet UILabel *labelProfitLossRate;
@property (nonatomic, retain) IBOutlet UILabel *labelFee;
@property (nonatomic, retain) IBOutlet UILabel *labelTax;
@property (nonatomic, retain) IBOutlet UILabel *labelInterest;
@end
Code:
#import <UIKit/UIKit.h>

#define kTableViewRowHeight		44
#define kTradeFilename			@"trade.plist"
#define kTradeKey				@"Trades"

@interface TradeTableController : UIViewController <UITableViewDelegate, UITableViewDataSource>  {
	NSMutableArray *list;
	UITableView *viewHeader;
	UITableView *viewDetail;
}

@property (nonatomic, retain) NSMutableArray *list;
@property (nonatomic, retain) IBOutlet UITableView *rowHeader;
@property (nonatomic, retain) IBOutlet UITableView *rowDetail;

-(IBAction) toggleEdit:(id)sender;
-(NSString *) tradeFilePath;
-(void) applicationWillTerminate:(NSNotification *)notification;

@end

screen like this
 

Attachments

  • SnapShot 2010-08-19 at 21.04.20.jpg
    SnapShot 2010-08-19 at 21.04.20.jpg
    31.4 KB · Views: 128
  • SnapShot 2010-08-19 at 21.04.11.jpg
    SnapShot 2010-08-19 at 21.04.11.jpg
    57.9 KB · Views: 147
  • SnapShot 2010-08-19 at 21.03.34.jpg
    SnapShot 2010-08-19 at 21.03.34.jpg
    65.7 KB · Views: 151
  • SnapShot 2010-08-19 at 21.08.29.jpg
    SnapShot 2010-08-19 at 21.08.29.jpg
    143.4 KB · Views: 224
  • SnapShot 2010-08-19 at 21.11.12.jpg
    SnapShot 2010-08-19 at 21.11.12.jpg
    65.6 KB · Views: 331
  • SnapShot 2010-08-19 at 21.09.38.jpg
    SnapShot 2010-08-19 at 21.09.38.jpg
    63.2 KB · Views: 315
Make a customer TableCell and TableView
screen like this

Thanks! That gave me enough of the idea I was able to Google and found examples. Still ran into issues but worked through them. My biggest one was that I didn't realize the UITableView has a property for the row size.

Its working for me with my own view.

Thanks!
 
Dear mikezang ,

can u please send me the sample that you make for the custom TableCell and TableView

My Email : faisal.ysabri@gmail.com

i will really appreciate it very
Accept my highest consideration...
 
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.