// TODO: Step 6c: uncomment to enable navigation to the session detail screen

		// Navigation to the next screen by pushing a a new instance of SessionViewController passing info from the row selected
//		public override void RowSelected (UITableView tableView, NSIndexPath indexPath)
//		{
//			var sessionGroup = grouping [indexPath.Section];
//			var session = sessionGroup.ElementAt (indexPath.Row);
//			
//			controller.NavigationController.PushViewController (new SessionViewController (session), true);
//			
//			tableView.DeselectRow (indexPath, true);
//		}

		
		public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath)
		{
			var sessionGroup = grouping [indexPath.Section];
			var session = sessionGroup.ElementAt (indexPath.Row);
			
			var cell = (SessionCell)tableView.DequeueReusableCell (sessionCellId);
			
			if (cell == null)
				cell = new SessionCell (sessionCellId);	
			
			cell.Session = session;
			
			return cell;
		}
        public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
        {
            var sessionGroup = grouping [indexPath.Section];
            var session      = sessionGroup.ElementAt(indexPath.Row);

            var cell = (SessionCell)tableView.DequeueReusableCell(sessionCellId);

            if (cell == null)
            {
                cell = new SessionCell(sessionCellId);
            }

            cell.Session = session;

            return(cell);
        }
		public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath)
		{
			var sessionGroup = grouping [indexPath.Section];
			var session = sessionGroup.ElementAt (indexPath.Row);

			// Specifies the Default table cell style
//			var cell = tableView.DequeueReusableCell (sessionCellId);
//			if (cell == null)
//				cell = new UITableViewCell (UITableViewCellStyle.Default, sessionCellId);
//			cell.TextLabel.Text = session.Title;

			// TODO: Step 5b: uncomment to use our custom table cell for the table (delete above)
			// Specifies our custom table cell style
			var cell = (SessionCell)tableView.DequeueReusableCell (sessionCellId);	// Cast the dequeued cell to our custom type
			if (cell == null)
				cell = new SessionCell (sessionCellId);		// Create new instances of the custom type
			cell.Session = session;
			
			return cell;
		}
        public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
        {
            var sessionGroup = grouping [indexPath.Section];
            var session      = sessionGroup.ElementAt(indexPath.Row);

            // Specifies the Default table cell style
//			var cell = tableView.DequeueReusableCell (sessionCellId);
//			if (cell == null)
//				cell = new UITableViewCell (UITableViewCellStyle.Default, sessionCellId);
//			cell.TextLabel.Text = session.Title;

            // TODO: Step 5b: uncomment to use our custom table cell for the table (delete above)
            // Specifies our custom table cell style
            var cell = (SessionCell)tableView.DequeueReusableCell(sessionCellId);               // Cast the dequeued cell to our custom type

            if (cell == null)
            {
                cell = new SessionCell(sessionCellId);                          // Create new instances of the custom type
            }
            cell.Session = session;

            return(cell);
        }