Re: [mono-android] Populate Spinner from DataTable

2011-12-16 Thread troadie
Thanks for all your help Mike. I've now got it working by using the solution at http://www.katr.com/article_android_spinner01.php www.katr.com/article_android_spinner01.php I'm returning a DataSet from a web service function and then using the DataSet to fill the Java object array, which is then

Re: [mono-android] Populate Spinner from DataTable

2011-12-16 Thread milop
That's exactly what I'm doing. My web service returns a custom DTO though. -- View this message in context: http://mono-for-android.1047100.n5.nabble.com/Populate-Spinner-from-DataTable-tp4370301p5080514.html Sent from the Mono for Android mailing list archive at Nabble.com. _

Re: [mono-android] Populate Spinner from DataTable

2011-12-15 Thread milop
Thanks for replying, Troadie. This is an old post and I've worked it out. Mike -- View this message in context: http://mono-for-android.1047100.n5.nabble.com/Populate-Spinner-from-DataTable-tp4370301p5078570.html Sent from the Mono for Android mailing list archive at Nabble.com. ___

Re: [mono-android] Populate Spinner from DataTable

2011-12-15 Thread milop
The reason why you can't use a datatable is that it is not serializable. The DataSet is. Ultimately you would want to create your own DTO (Data Transfer Object), but using a DataSet can get an app up and running in a pinch. Mike -- View this message in context: http://mono-for-android.1047100.n5

Re: [mono-android] Populate Spinner from DataTable

2011-12-14 Thread troadie
I've just noticed I can't see a link in my first reply to you, I must have forgot to add it, the link is http://www.katr.com/article_android_spinner01.php http://www.katr.com/article_android_spinner01.php hope it helps. -- View this message in context: http://mono-for-android.1047100.n5.nabble.

Re: [mono-android] Populate Spinner from DataTable

2011-12-14 Thread troadie
Thanks for the help, the code you have posted is exactly what I was doing but I was returning a strongly typed DataTable which it didn't seem to like, I've now changed it and the error has gone but I will also now return a DataSet as you have suggested. Thanks again. -- View this message in conte

Re: [mono-android] Populate Spinner from DataTable

2011-12-14 Thread milop
Troadie, Consume it like you would normally: Add a web reference to your project, call it MyWebService: using (MyWebService ws = new MyWebService()) { DataTable dt = ws.SomeFunction(); // Now use the datatable. } Does this

Re: [mono-android] Populate Spinner from DataTable

2011-12-14 Thread troadie
This might help. I am having trouble returning a datatable from a web service could you post some code to help me? -- View this message in context: http://mono-for-android.1047100.n5.nabble.com/Populate-Spinner-from-DataTable-tp4370301p5074271.html Sent from the Mono for Android mailing list arc