I just wanted to bind the below List object to Grid view. That list contains another List. So when I bind the datasource, that column is coming as EMPTY.
Details below:
List<Person> Persons = new List<Person>();
public class Person
{
public string Name1;
public string Name2;
public List<string> Address;
public DateTime DateOfBirth;
public string TeamName;
}
I assigned my gridview as below:
var data = new List<Persons>();
data = GetData();
GrdPerson.DataSource = data;
GrdPerson.DataBind();
Since we have address as List<string> in datasource, it is coming as empty in page.
I know that Address does not contain any public property hence it is coming as empty. So I tried to use Gridview in Address column of Master Grid.
But do not know how to assign the datasource at a time.