i have populated gridview from SaleDAL class, assuming following is the code, Please ignore any syntax error
public class Product
{
public int ProductID
{ }
public string ProductName
{ }
}
public class Sale
{
public int SaleID
{ }
public int ProductID
{ }
public int Amount
{ }
}
// Data Access Layers
public class ProductsDAL
{
public IList<Product> GetProducts()
{ }
}
public class SaleDAL
{
public IList<Sale> GetSales()
{ }
public void AddSale()
{}
}
// populate gridview,
// ObjectDataSource1 is configured with SaleDAL
GridView1.DataSourceID = "ObjectDataSource1";
2nd column is ProductID, i want to replace it with ProductName, what is the easiest way, i dont wnat to write an other class, please note that later edit action will also be performed on it.