title: MVVMCross iOS: How to trigger RowSelected on a Custom TableViewSource using CreateBindingSet?
body: <p>My question is for MVVMCross in iOS. I have a custom TableView and a detailView. How can I bind my "showDetailCommand", so when user click on one of the rows on TableView with trigger RowSelected to switch to detailViewModel?</p>
  
  <p>Here is my code structure:</p>
  
  <pre><code>public class SearchResultsViewModel: MvxViewModel
  {
      private MvxCommand _showDetailCommand;
      public IMvxCommand ShowDetailCommand
      {
          get
          {
              _showDetailCommand = _showDetailCommand ?? new MvxCommand(ShowDetailCommandHandler);
              return _showMapCommand;
          }
      }
  
      private void ShowDetailCommandHandler()
      {
          ShowViewModel&lt;ResultDetailViewModel&gt;(new
              {
                  city = _filter.City,
                  state = _filter.State,
                  interstate = _filter.Interstate,
                  travelPlaza = _filter.SearchTravelPlaza,
                  hasCatScale = _filter.HasCatScale,
                  hasWashoutExpress = _filter.HasWashoutExpress,
                  hasUndercarriage = _filter.HasUndercarriage,
                  nearest = _nearest
              });
      }
  }
  
  [Register("SearchResults")]
  public class SearchResultsView : MvxTableViewController
  {
      public override void ViewDidLoad()
      {
                  Title = "List";
                  base.ViewDidLoad();
                  var source = new TableViewSource(TableView);
  
                  var bindings = this.CreateBindingSet&lt;SearchResultsView, SearchResultsViewModel&gt;();
                  bindings.Bind(source).To(vm =&gt; vm.Items);
                  bindings.Apply();
  
                  TableView.BackgroundColor = UIColor.Clear;
                  TableView.ShowsVerticalScrollIndicator = false;
                  TableView.ScrollEnabled = true;
                  TableView.SeparatorStyle = UITableViewCellSeparatorStyle.None;
                  TableView.Source = source;
  
                  TableView.ReloadData();
  
      }
  
      public class TableViewSource : MvxTableViewSource
      {
          public TableViewSource(UITableView tableView)
              : base(tableView)
          {
              tableView.RegisterClassForCellReuse(typeof(TableViewCell), TableViewCell.CellIdentifier);
          }
  
          public override float GetHeightForRow(UITableView tableView, NSIndexPath indexPath)
          {
              var item = GetItemAt(indexPath);
              return TableViewCell.CellHeight(item);
          }
  
          protected override UITableViewCell GetOrCreateCellFor(UITableView tableView, NSIndexPath indexPath, object item)
          {
              var cell = tableView.DequeueReusableCell(TableViewCell.CellIdentifier) ?? new TableViewCell();
              return cell;
          }
      }
  
  }
  
  [Register("TableViewCell")]
  public class TableViewCell : MvxTableViewCell
  {
  
      public static readonly NSString CellIdentifier = new NSString("TableViewCell");
  
       public TableViewCell()
          : base()
      {
          Initialise();
      }
  
      public TableViewCell(IntPtr handle)
          : base(handle)
      {
          Initialise();
      }
  
      private void Initialise()
      {
  
          var titleLabel = new UILabel(new RectangleF(10, 2, 200, 25));
          Add(titleLabel);
  
          this.DelayBind(() =&gt;
          {
              var bindings = this.CreateBindingSet&lt;TableViewCell, SearchResultsItemViewModel&gt;();
              bindings.Bind(titleLabel).For(x =&gt; x.Text).To(vm =&gt; vm.Name);
              bindings.Bind(??).For(x =&gt; x.SelectionChangeCommand).To(vm =&gt; vm.showDetailCommand); // what should be in this line ??
              bindings.Apply();
          });
  
      }
  
  }
  </code></pre>