One thing to remember: if you use the database record inside a lambda
in the loop, you have to make it local:

foreach(var record in etc etc)
{
  var localrecord = record;
  section.Add(new StringElement("A","b", delegate {
    Console.WriteLine(record.Field);
    Console.WriteLine(localrecord.Field);
  });
}

These will NOT be the same excpet for the final record - the local one
has the correct value. Just a quick gotcha.

On Thu, Jan 26, 2012 at 16:19, vbisbest <[email protected]> wrote:
> Thanks Nic, thats exactly what I ended up doing.  I was hoping there was an
> easy way to bind the data directly to the table, but adding one by one is no
> big deal.  Thanks!
>
> --
> View this message in context: 
> http://monotouch.2284126.n4.nabble.com/Monotouch-Dialog-with-SQLLite-net-tp4321061p4330834.html
> Sent from the MonoTouch mailing list archive at Nabble.com.
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch



-- 
Nic Wise
t.  +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
b. http://www.fastchicken.co.nz/

Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p
mobileAgent (for FreeAgent): get your accounts in your pocket.
http://goo.gl/IuBU
Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to