newbie question

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hello,

I am just starting to tinker with the compactframework. How do I bind a
datagrid to a dataset that is returned from a webservice for a pocketpc
mobile device? Any suggestions of good books out there? Thanks in advance.

John
 
The .NET Compact Framework by Wrigley and Wheelwright is a must have as far
as books go. Dan Fergus and Larry Roof have a 1000+ page book from Apress
coming out in the next week or two which should be pretty good as well.

Are you asking how to get a DataSet from the Web Service, or how to bind it
once you have it.

If you already have it, just set the Grid's datasource to ds.
 
William,

Thanks for the suggestions on books I will order them today. As for
my question I have the dataset and I do get the dataset and set the
datasource but it doesn't seem to populate the datagrid. Am I missing a line
of code(see below)? Thanks again for the help.

John



Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnSubmit.Click

Dim service As New PocketPC.PocketPC

Dim ds As DataSet = service.tstQuery(tstQuery.Text)

dgQuery.DataSource = ds

End Sub
 
The grid's DataSource has to be bound to a DataTable not a DataSource so you
need something like:

dgQuery.DataSource = ds.Tables(0)

John.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top