title: MonoTouch.Dialog: Search, Querying Database each keystroke
body: <p>I have enabled search in my MonoTouch.Dialog. After each keystroke I call the database, get the updated list and then re-create the Root. The tableview is always empty though after I regenerate the Root, even though I can confirm that I am adding elements each time.</p>
  
  <p>In a situation where the entire list needs to be recreated each time the user types in the search bar, do I need to recreate the Root each time, or clear it and re-populate it?</p>
  
  <p>I have tried both ways but the tableview never renders anything after I try to regenerate it.</p>
  
  <pre><code>    this.SearchTextChanged += (sender, args) =&gt; {
               query = args.Text;
              CreateRoot();
          };
  
      void CreateRoot()
      {
          if(this.Root!=null)
             this.Root.Clear();
  
          Section section = new Section();
          List&lt;TermItem&gt; terms = LegalDatabase.GetTerms(query, SearchScope);
  
          foreach (TermItem term in terms)
          {
              var eTerm = new TermElement(term.ID);
              section.Add(eTerm);
          }
          terms = null;
          this.Root.Add(section);
      }
  </code></pre>