I have a combobox and a textbox to filter my data and show them in a datagridview:
AFDBEntities adbe = new AFDBEntities();
private void btnSearch_Click(object sender, EventArgs e)
{
var cbo = cmbInstallers.Text;
switch (cbo){
case "First Name":
var ianst = (from x in adbe.TblInstallers
where x.FirstName.Contains(txtSearch.Text)
select x).ToList();
dgvSearched.DataSource = ianst;
}
and now when I have for example 4 results that contains "x", they all shown in datagridview. I want to make right click option on datagridview that gives me a menu for opening a new form to edit selected row of results.