Data class implementations not fully passed to Silverlight?
-
Here is my scenario: Data Layer : running as an simple web service as required by Silverlight Entities are generated from the database tables An extended class is defined with the following additions:
public partial class CustomerMaster { public override string ToString( ) { return this.CustomerName; } } public partial class CustomerLocation { public override string ToString( ) { return this.\_LocationID; } }
CustomerMaster and CustomerLocation are two entities derived from the database. Silverlight side When I get my data I bind a list box to the result of my async query. I get the list of customers no problem. But listbox calls ToString() on my objects and I'm getting the default behaviour (namespace) not my overridden code!!!??? Anyone know a reason why this would happen?
-
Here is my scenario: Data Layer : running as an simple web service as required by Silverlight Entities are generated from the database tables An extended class is defined with the following additions:
public partial class CustomerMaster { public override string ToString( ) { return this.CustomerName; } } public partial class CustomerLocation { public override string ToString( ) { return this.\_LocationID; } }
CustomerMaster and CustomerLocation are two entities derived from the database. Silverlight side When I get my data I bind a list box to the result of my async query. I get the list of customers no problem. But listbox calls ToString() on my objects and I'm getting the default behaviour (namespace) not my overridden code!!!??? Anyone know a reason why this would happen?
-
Methods are not part of the DataContract so they won't be available when you create the proxy for the client.
There's nothing left in my right brain and nothing right in my left brain.
yeh...found I had to specify the field in the data to display within the properties.