SectionedUITableViewSample.TableViewDataSource.GetCell C# (CSharp) Method

GetCell() public method

public GetCell ( MonoTouch tableView, MonoTouch indexPath ) : UITableViewCell
tableView MonoTouch
indexPath MonoTouch
return UITableViewCell
        public override UITableViewCell GetCell(MonoTouch.UIKit.UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath)
        {
            var termsinsection = filteredDictionaryItems.FindAll(x => x.StartsWith(filteredSectionList[indexPath.Section]));

            string dictionaryItem = termsinsection[indexPath.Row];
            string cellID = "CellID";

            UITableViewCell cell = tableView.DequeueReusableCell(cellID);
            if(cell == null)
            {
                cell = new UITableViewCell(UITableViewCellStyle.Default, cellID);
                cell.Accessory = UITableViewCellAccessory.DisclosureIndicator;
            }
            cell.TextLabel.Text = dictionaryItem;
            return cell;
        }