1
行
我有一个组合框和文本框来筛选我的数据,并显示在一个DataGridView:上的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;
}
,现在当我有例如4个结果包含“x”,它们都显示在datagridview中。 我想在datagridview上做出右键点击选项,它给了我一个菜单来打开一个新窗体来编辑选中的结果行。