protected override void OnInitialized() { base.OnInitialized(); Master = new Master(); Master.Customers = new List <KeyValuePair <string, int> > { new KeyValuePair <string, int>("Customer1", 1), new KeyValuePair <string, int>("Customer2", 2), new KeyValuePair <string, int>("Customer3", 3) }; Master.Products = BlazorApp1.Data.Product.GetAllProducts().Select(e => new KeyValuePair <string, int>(e.Name, e.Id)).ToList(); Master.AddNewDetailRow(); Master.DetailPropertyChanged += Master_DetailPropertyChanged; }
void AddNewRow() { Master.AddNewDetailRow(); }