S
Stephen Woolhead
Hi all, I have a web service that returns me an array of objects.
When I try to set this array as the datasource for a Datagrid and call
DataBind I get the following error message
DataBinder.Eval: 'MyWebService.SalesQuote' does not contain a property with
the name OurRef.
The code that causes the problem is:
'MyWebService.Exchequer ews = new Exchequer () ;
SalesQuote[] ds = ews.GetSalesQuotesForAccount (AccountCode) ;
dg.DataSource = ds ;
dg.DataKeyField = "OurRef" ; << Source of error
dg.DataBind () ; << Code goes bang here
The SalesQuote object does have a OurRef member, I can see it in the
debugger. The only thing I can think of is that the OurRef is a member
variable not a property. Would this stop the dataGrid binding?
The SalesQuote class is a proxy class generated via 'Add WebReference' ;
Thanks
Stephen.
When I try to set this array as the datasource for a Datagrid and call
DataBind I get the following error message
DataBinder.Eval: 'MyWebService.SalesQuote' does not contain a property with
the name OurRef.
The code that causes the problem is:
'MyWebService.Exchequer ews = new Exchequer () ;
SalesQuote[] ds = ews.GetSalesQuotesForAccount (AccountCode) ;
dg.DataSource = ds ;
dg.DataKeyField = "OurRef" ; << Source of error
dg.DataBind () ; << Code goes bang here
The SalesQuote object does have a OurRef member, I can see it in the
debugger. The only thing I can think of is that the OurRef is a member
variable not a property. Would this stop the dataGrid binding?
The SalesQuote class is a proxy class generated via 'Add WebReference' ;
Thanks
Stephen.