iphone+In table view 10th row radio button is not selected
<p>I have one table view it contains two radio button in each row(YES/NO type), but my logic is working upto 0 to 9th row after it will not working(after 9th row radio button is not selected). please help me on this one</p>

<p>Thanks in advance</p>

<p>here is the code:</p>

<p>.m file </p>

<pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    NSString *CellIdentifier = [NSString stringWithFormat:@"%d-%d",indexPath.section, indexPath.row];
    QuesAnsListCustomCell *cell = (QuesAnsListCustomCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier] ;
    if (cell == nil) {
        [[NSBundle mainBundle] loadNibNamed:@"QuesAnsListCustomCell" owner:self options:nil];
        cell = _customCell;
        cell._delegate = self;
    }
    cell.selectionStyle= UITableViewCellSelectionStyleNone;
    DOQCategory *cat = [m_Vizuera.m_QuestionsCategoryList.m_QuestionsCategoryListArray objectAtIndex:indexPath.section];
    DOQQuestion *ques = [cat.m_CategoryArray objectAtIndex:indexPath.row];

    cell._queTxtView.text = [ques.m_Attr valueForKey:@"QNAME"];
    cell._queTxtView.font = [UIFont systemFontOfSize:14];
    cell._option1Label.text = [ques.m_Attr valueForKey:@"OPTION1_TEXT"];
    cell._option2Label.text = [ques.m_Attr valueForKey:@"OPTION2_TEXT"];
    NSString *_key = [NSString stringWithFormat:@"%d%d",(indexPath.section+1),(indexPath.row+1)];
    NSLog(@"Key  :  %@",_key);
    NSString *_result = [_userSelection valueForKey:_key];
    NSLog(@"Value : %@",_result);

    if ([_result isEqualToString:@"Y"]) {
        cell._option1Btn.imageView.image = [UIImage imageNamed:@"yes.png"];
        cell._option2Btn.imageView.image = [UIImage imageNamed:@"no.png"];
    } else {
        cell._option1Btn.imageView.image = [UIImage imageNamed:@"no.png"] ;
        cell._option2Btn.imageView.image = [UIImage imageNamed:@"yes.png"];
    }
    cell._option1Btn.tag = ((indexPath.section+1)*10)+(indexPath.row+1);
    cell._option2Btn.tag = ((indexPath.section+1)*10)+(indexPath.row+1);

    return cell;
}

-(void) respondToLeftBtnAction:(UIButton*) sender {
    if(debug)NSLog(@"In the left button clicked method");
    if(debug)NSLog(@"left button in %d row is YES", sender.tag);

    int section = (sender.tag/10 -1);
    int row = (sender.tag%10 -1);

    if(debug)NSLog(@"section number : %d", sender.tag/10);
    if(debug)NSLog(@"Row number : %d ", sender.tag%10);
    QuesAnsListCustomCell *cell = (QuesAnsListCustomCell *) [self.theTableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:row inSection:section]];

    [cell._option1Btn setImage:[UIImage imageNamed:@"yes.png"] forState:UIControlStateNormal];
    [cell._option2Btn setImage:[UIImage imageNamed:@"no.png"] forState:UIControlStateNormal];

    VizueraQAppDelegate *appDelegate = (VizueraQAppDelegate *)[[UIApplication sharedApplication] delegate];

    BOOL selected = YES;
    NSString *tagIDStr = [NSString stringWithFormat:@"%d",sender.tag];
    NSLog(@"Tag number while adding to the selIndexQuestionArray : %@",tagIDStr);
    [_userSelection setValue:@"Y" forKey:tagIDStr];
    [appDelegate checkActionQuestion:tagIDStr add:selected];
}

-(void) respondToRightBtnAction:(UIButton*) sender {
    if(debug)NSLog(@"In the Right button clicked method");
    if(debug)NSLog(@"left button in %d row is YES", sender.tag);

    int section = (sender.tag/10 -1);
    int row = (sender.tag%10 -1);

    if(debug)NSLog(@"section number : %d", sender.tag/10);
    if(debug)NSLog(@"Row number : %d ", sender.tag%10);
    QuesAnsListCustomCell *cell = (QuesAnsListCustomCell *) [self.theTableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:row inSection:section]];

    [cell._option1Btn setImage:[UIImage imageNamed:@"no.png"] forState:UIControlStateNormal];
    [cell._option2Btn setImage:[UIImage imageNamed:@"yes.png"] forState:UIControlStateNormal];

    VizueraQAppDelegate *appDelegate = (VizueraQAppDelegate *)[[UIApplication sharedApplication] delegate];
    BOOL selected = NO;
    NSString *tagIDStr = [NSString stringWithFormat:@"%d",sender.tag];
    [_userSelection setValue:@"N" forKey:tagIDStr];
    if(debug)NSLog(@"Tag number while adding to the selIndexQuestionArray : %@",tagIDStr);
    [appDelegate checkActionQuestion:tagIDStr add:selected];
}
</code></pre>
