public void BindMyData() { dsNewsList = new NewsListDataSource(); dsNewsList.LoadData(); tblNewsList.DataSource = dsNewsList; tblNewsList.Delegate = new NewsListDelegate(this); tblNewsList.ReloadData(); }
public override MonoTouch.Foundation.NSIndexPath WillSelectRow(UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath) { NewsListDataSource ds = tableView.DataSource as NewsListDataSource; this.parentController.SelectedFeedItem = ds.GetRow(indexPath.Row); new de.dhoffmann.mono.adfcnewsapp.buslog.database.Rss().MarkItemsAsRead(this.parentController.SelectedFeedItem.ItemID, true); ((NewsListDataSource)tableView.DataSource).ViewData.FirstOrDefault(p => p.Value.ItemID == this.parentController.SelectedFeedItem.ItemID).Value.IsRead = true; tableView.ReloadRows(new MonoTouch.Foundation.NSIndexPath[] { indexPath }, UITableViewRowAnimation.Fade); return(indexPath); }