DataBinding Web Service Result to DataGrid

C

Craig

I'm a newbie to .NET and Web Services so I don't know if what I'm about
to ask is easy or not as it's all over my head at the moment.

I'm trying to display the response of a web service on an aspx page
using a datagrid like this:-

Private Sub Submit_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Submit.Click

Dim getAvailability As New dialanexchangeavail.IDAEOnlineservice
Dim AuthID As String
Dim WebCountryCode As String
Dim WebRegionCode As String
Dim Year As Integer
Dim Month As Integer
Dim LastDepositID As String

AuthID = "DEMO-DAE-001"
WebCountryCode = "A"
WebRegionCode = "Q"
Year = 2006
Month = 11
LastDepositID = ""

' Call the method of the proxy class to initiate the call to the XML
Web service method.


DataGrid1.DataSource = getAvailability.WSGetAvailability(AuthID,
WebCountryCode, WebRegionCode, Year, Month, LastDepositID)
DataGrid1.DataBind()

End Sub

When the button is clicked, you see a wait of about 4 seconds (I'm in
UK, the web service is hosted in Australia) then I get the following
error:-

"An invalid data source is being used for DataGrid1. A valid data
source must implement either IListSource or IEnumerable."

I've read responses on this error in this news group but they don't
relate to web services. I'm a bit stuck I think.

Any advice would be appreciated.

Regards,

Craig
 
G

Guest

It seems that return data from WS are not in acceptable format. The
description of the error is clear:

An invalid data source is being used for DataGrid1. A valid data
source must implement either IListSource or IEnumerable.

You ought to ask supplier of this WS about return data structure .
 

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

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top