I have two model.
When I want to display a list of Product in grid, if PurchaseInvoiceDetail have records, Product grid show empty list,
and when i delete PurchaseInvoiceDetail records, Product's grid display list of product.
(I use Editing_Popup grid)
When I want to display a list of Product in grid, if PurchaseInvoiceDetail have records, Product grid show empty list,
and when i delete PurchaseInvoiceDetail records, Product's grid display list of product.
(I use Editing_Popup grid)
public class Product
{
[Key]
[ScaffoldColumn(false)]
public int ProductId { get; set; }
public string Name { get; set; }
public int Number { get; set; }
public virtual ICollection<
PurchaseInvoiceDetail
> PurchaseInvoiceDetail { get; set; }
}
public class PurchaseInvoiceDetail
{
[Key]
public int PurchaseInvoiceDetailId { get; set; }
public int Number { get; set; }
public decimal PurchasePrice { get; set; }
//Navigation Properties
public int ProductId { get; set; }
public virtual Product Product { get; set; }
}