当我双击DataGridView单元格(行)时,我需要选择并编辑新行中的一行。我到目前为止已经做的是:Datagrdview以新形式编辑
public partial class Vozila : Form
{
public static int cellValue = 0;
public Vozila()
{
InitializeComponent();
}
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
cellValue = Convert.ToInt32(((DataGridView)sender).SelectedCells[0].Value);
DodajVozilo check = new DodajVozilo();
Check.Show();
}
理念要做到这一点是使用可变cellValue(在DodajVozilo_Load新形式DodajVozilo),并与第 WHERE id=cellValue
MySql的SELECT命令,但一个不能得到任何有用的结果。公共静态int变量的WHERE子句语法是什么? 有没有其他想法?
从阅读你的问题,我认为你正在寻找你的SQL查询的where子句是否正确? – Sybren 2014-12-09 12:48:04