DataGridViewComboBoxCell : How to set selected value when adding a row?
问题 I have this form that lets user choose a (Code - Product) item from a comboxbox. input quantity and price and Add it to a list. Loading the inventories to the form private List<Inventory> inventories = new Inventory().read_inventory(); Setting the ComboBox with values private void set_drop_down_inventory() { cb_inventory.DisplayMember = "name"; cb_inventory.DataSource = inventories; cb_inventory.ResetText(); cb_inventory.SelectedIndex = -1; } When a user selects a product, it will create a