This might help:
https://github.com/nicwise/londonbikeapp/blob/master/londonbikeapp/NearDialogViewController.cs#L269
But really, all you are doing is this (I use LoadView to do this, but
there are a few events you can use)
1. inherit a class off DialogViewController
2. In the LoadView:
a. setup the root
RootElement root = new RootElement();
b. make a section:
Section section = new Section("header", "footer");
c. get your data from the database, and add a new Element for each one
foreach(var record in DataBase.GetTheRecordsYouWant())
{
section.Add(new StringElement(record.AMainField, record.AMinorField));
}
d. add the section to the root:
root.Add(section);
e. make it use the root
Root = root;
(the DialogViewController has a Root - I build them compleatly before
assigning them, but you could just do:
Section section = new Section("header", "footer");
foreach(var record in DataBase.GetTheRecordsYouWant())
{
section.Add(new StringElement(record.AMainField, record.AMinorField));
}
Root.Add(section);
If you want Elements which do things which are not the default, you
can inherit off Element, StringElement or any of the others and put
UILabels etc into the ContentView:
https://github.com/nicwise/londonbikeapp/blob/master/londonbikeapp/Elements.cs
HTH
On Tue, Jan 24, 2012 at 18:11, vbisbest <[email protected]> wrote:
> Thank you, I tried going through the code, but this is way overkill for what
> I am looking for. I just want to simply take table and apply it to a
> monotouch.dialog plain table style. Any super simple code examples out
> there? Thanks again
>
> --
> View this message in context:
> http://monotouch.2284126.n4.nabble.com/Monotouch-Dialog-with-SQLLite-net-tp4321061p4324592.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