So I have this code:
private void frmSell_Load(object sender, EventArgs e)
{
dgvProducts.DataSource = _data.AllProducts();
}
Where _data.AllProducts() returns a List. The only problem is that line will only work when outside the _Load() event, for example, it will perfectly work when placed inside a button´s OnClick()
How can I load de products in the _Load event?