Hey,
I have a user object which consist of some data and other classes of data:
[DataContract]
public class User
{
[DataMember(Order = 0)]
public int UserId
{
get; set;
}
public UserCredentials UserCredentials
{
get; set;
}
[DataMember(Order = 1)]
public String SessionId { get; set; }
[DataMember(Order = 2)]
public Email Email
{
get; set;
}
[DataMember(Order = 3)]
public Password Password
{
get; set;
}
[DataMember(Order = 4)]
public UserDetails UserDetails
{
get; set;
}
[DataMember(Order = 5)]
public ReferralDetails ReferralDetails
{
get; set;
}
If i display a list of this in ASP.NET datagrid as follows:
List<Users> users = // get some list of users
DataGridUsers.DataSource = users;
DataGridUsers.DataBind();
This displays sessionId and userId but no other data fields because they are not basic types. What is my solution?
Thanks!