//
//  GridData.h
//  EAMiPad
//
//  Created by temp on 1/23/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface GridData : NSObject
{
    BOOL moreData;
    long currentPosition;
    NSArray    *fields; 
    NSMutableArray    *data; 

}


@property (nonatomic, ) BOOL      moreData;
@property (nonatomic, ) long      currentPosition;
@property (nonatomic, strong) NSArray      *fields;
@property (nonatomic,  strong) NSMutableArray      *data;
@property (nonatomic,  strong) NSString      *session;
@property (nonatomic,  strong) NSData      *xmlData;


- (int)indexOfField:(NSString *)field;
- (id)objectOfField:(NSString *)field forRow:(int)row;
- (void)setObjectForField:(NSString *)key forRow:(int)row withValue:(NSObject *) value;
- (void)removeSpecificRowFromGrid:(int)row;
- (void)insertRowToGrid:(NSObject *)pRow;
- (void)sortByField:(NSString*)field orderByAscending:(BOOL)isAscending;
- (NSString *)stringOfField:(NSString *)field forRow:(int)row;
- (NSDate *)dateOfField:(NSString *)field forRow:(int)row;
- (NSNumber *)numberOfField:(NSString *)field forRow:(int)row;
//- (id)saveToFile:(NSString *)file;
//- (id)loadFromFile:(NSString *)file;


@end
