Note that there are some explanatory texts on larger screens.

plurals
  1. POretrieved data from sqlite database and displaying it on grouped table view
    primarykey
    data
    text
    <p>hii every one </p> <p>i am brand new to obj c, i have did a sample project where i have 2 screens on the first screen i have six text fields &amp; 2 buttons named save and ViewData ,on click of save data which is entere d in the text field will be get saved in the sqliteData Base ,&amp; on click of the button ViewData it will navigate to a new screen which has a grouped table view, here i am trying to display the data which is stored in the sqlite ,in the grouped table view i have 6 sections i am using following code to display the data in grouped table view,problem is grouped table view is displaing only the last data which is entered ih the text field,,but i need to display all the data which enterd should be shown under that section </p> <pre><code>appDelegate = (iICS_testAppDelegate *)[[UIApplication sharedApplication] delegate]; for(int intVar=0;intVar &lt; [appDelegate.arrObjects count];intVar++) { insertUpdateDelete *InsertRecord = [appDelegate.arrObjects objectAtIndex:intVar]; NSLog(@"InsertRecord:%@",InsertRecord); NSMutableArray *arrTemp1 = [[NSMutableArray alloc]initWithObjects:InsertRecord.strsixth,nil]; NSMutableArray *arrTemp2 = [[NSMutableArray alloc]initWithObjects:InsertRecord.strfifth,nil]; NSMutableArray *arrTemp3 = [[NSMutableArray alloc]initWithObjects:InsertRecord.strFourth,nil]; NSMutableArray *arrTemp4 = [[NSMutableArray alloc]initWithObjects:InsertRecord.strLogin,nil]; NSMutableArray *arrTemp5 = [[NSMutableArray alloc]initWithObjects:InsertRecord.strMiddleName,nil]; NSMutableArray *arrTemp6 = [[NSMutableArray alloc]initWithObjects:InsertRecord.strFirstName,nil]; NSMutableDictionary *temp =[[NSMutableDictionary alloc]initWithObjectsAndKeys:arrTemp1,@"Item Name",arrTemp2,@"Manufacturer",arrTemp3,@"Weight of Item",arrTemp4,@"Num of Item",arrTemp5,@"Price of Item",arrTemp6,@"MFG Date",nil]; self.tableContents =temp; [temp release]; NSLog(@"table %@",self.tableContents); NSLog(@"table with Keys %@",[self.tableContents allKeys]); self.sortedKeys =[[self.tableContents allKeys] sortedArrayUsingSelector:@selector(compare:)]; NSLog(@"sorted %@",self.sortedKeys); [arrTemp1 release]; [arrTemp2 release]; [arrTemp3 release]; [arrTemp4 release]; [arrTemp5 release]; [arrTemp6 release]; } </code></pre> <p>here im assigning the text for the row </p> <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { //insertUpdateDelete *InsertRecord = [appDelegate.arrObjects objectAtIndex:indexPath.row]; static NSString *SimpleTableIdentifier = @"SimpleTableIdentifier"; NSArray *listData =[self.tableContents objectForKey:[self.sortedKeys objectAtIndex:[indexPath section]]]; UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:SimpleTableIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:SimpleTableIdentifier] autorelease]; } NSUInteger row = [indexPath row]; //cell.textLabel.text = [appDelegate.arrObjects objectAtIndex:row]; cell.textLabel.text = [listData objectAtIndex:row]; return cell; } </code></pre> <p>thanks in advance!</p> <p><a href="http://i.stack.imgur.com/3ZYAl.png" rel="nofollow">This</a> is my snapshopt of grouped table view. I need the data which is entered through the text field shoul be viewed under particular section</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload