public override void RowSelected(UITableView tableView, NSIndexPath indexPath) { var alertCat = LocalBhasvicDB.getAlertCategory(alertCatList.ElementAt(indexPath.Row).Category); if (alertCat.Category != "General") { alertCat.Switch(); Console.WriteLine(alertCat.Category); LocalBhasvicDB.updateAlertCategoryTable(alertCat); tableView.DeselectRow(indexPath, true); } tableView.ReloadData(); }
public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) { var cell = tableView.DequeueReusableCell(cellidentifier); if (cell == null) { cell = new UITableViewCell(UITableViewCellStyle.Default, cellidentifier); } var alertCat = LocalBhasvicDB.getAlertCategory(alertCatList.ElementAt(indexPath.Row).Category); cell.TextLabel.Text = alertCatList.ElementAt(indexPath.Row).Category; if (alertCat.Alert == true) { cell.Accessory = UITableViewCellAccessory.Checkmark; } else { cell.Accessory = UITableViewCellAccessory.None; } return(cell); }