Hello,
I'm not sure if this question has been asked before, but anyway;
I have an ObjectDataSource that I want to bind to a Grid. The objects in the data source has one property that is a list, and I would like all of the items in that list to become their own columns. Lets pretend it looks like this:
public class Foo
{
public int Id { get; set; }
public string X { get; set; }
public List<Bar> Bars { get; set; }
}
public class Bar
{
public int Id { get; set; }
public string Y { get; set; }
}
If my data source has a collection of Foo objects, can I make the grid show columns for the following values?
Foo.Id, Foo.X, Foo.Bars[0].Y, Foo.Bars[1].Y, ..., Foo.Bars[n].Y
Thanks a lot!
I'm not sure if this question has been asked before, but anyway;
I have an ObjectDataSource that I want to bind to a Grid. The objects in the data source has one property that is a list, and I would like all of the items in that list to become their own columns. Lets pretend it looks like this:
public class Foo
{
public int Id { get; set; }
public string X { get; set; }
public List<Bar> Bars { get; set; }
}
public class Bar
{
public int Id { get; set; }
public string Y { get; set; }
}
If my data source has a collection of Foo objects, can I make the grid show columns for the following values?
Foo.Id, Foo.X, Foo.Bars[0].Y, Foo.Bars[1].Y, ..., Foo.Bars[n].Y
Thanks a lot!