Hello mates!
Well, I'm trying to databind my model to the dataGridView's datasource, but I have a problem, a little-big one.
for this example, let's use this model:
public class Orders
{
public int OrderID { get; set; }
public decimal Total { get; set; }
public DateTime Date { get; set; }
public virtual Clients Clients { get; set; }
}
public class Clients
{
public int ID { get; set; }
public string Name { get; set; }
}I want to display on dataGridView's DataSource the following columns: OrderID, Total and the Name of the Client.
My GetOrders() returns a IList<Orders> and I can get the name through the code.
IList<Orders> orders = GetOrders(); var name = orders.Clients.Name;Anyway, my problem is: How do I do this?
Ash nazg durbatulûk, ash nazg gimbatul, Ash nazg thrakatulûk agh burzum-ishi krimpatul.