Condition or check if i change a section name


#1

I need to check if my section header is changed in - (void)shinobiDataGrid:(ShinobiDataGrid *)grid prepareCellForDisplay:(SDataGridCell *)cell
because i need to reset my counter how can i condition the section header?

- (void)shinobiDataGrid:(ShinobiDataGrid *)grid prepareCellForDisplay:(SDataGridCell *)cell
{
    // both columns use a SDataGridTextCell, so we are safe to perform this cast
    SDataGridTextCell* textCell = (SDataGridTextCell*)cell;
    OrderGroup *group=_sortedData[cell.coordinate.row.sectionIndex];
    
    NSString *groupNameOld=group.groupName;
    OrderDetailProduct *order=group.groups[cell.coordinate.row.rowIndex];







   if ([cell.coordinate.column.title isEqualToString:@"Qty Rcvd"])
        
    {
        if (txtQuantity==nil) {
            
            if (![group.groupName isEqualToString:groupNameOld]) {
                rowQtyRcvd=0;
            }
            txtQuantity=[[UITextField alloc]init];
            txtQuantity.tag=103;
            [txtQuantity setAccessibilityHint:[NSString stringWithFormat:@"%d", rowQtyRcvd]];
            rowQtyRcvd=rowQtyRcvd+1;
            txtQuantity.text=[NSString stringWithFormat:@"%@", order.QuantityReceived];
            txtQuantity.delegate=self;
            txtQuantity.borderStyle=UITextBorderStyleRoundedRect;
            txtQuantity.frame=CGRectMake(8, 6, 37, 25);
            UIFont *font = [UIFont fontWithName:@"Helvetica" size:10.7f];
            txtQuantity.font=font;
            [txtQuantity addTarget:self action:nil forControlEvents:UITextFieldTextDidBeginEditingNotification];