G
Guest
Hi,
how to set cursor in datagridview on new created row.
Source:
private void btnAdd_Click(object sender, EventArgs e)
{
TtfMovieTypeEditor aEditor = new TtfMovieTypeEditor();
if(aEditor.ShowDialog() == DialogResult.OK)
{
DataRow dataRow;
dataRow = dtMovieTypes.NewRow();
dataRow["Name"] = aEditor.edtName.Text;
dtMovieTypes.Rows.Add(dataRow);
//now datagridviewTypes.Select() not works
//I need something like datagridviewTypes.Locate(dataRow)
//to synchronize grid and dataset
};
aEditor.Dispose();
}
Thanks in advance
Peter
how to set cursor in datagridview on new created row.
Source:
private void btnAdd_Click(object sender, EventArgs e)
{
TtfMovieTypeEditor aEditor = new TtfMovieTypeEditor();
if(aEditor.ShowDialog() == DialogResult.OK)
{
DataRow dataRow;
dataRow = dtMovieTypes.NewRow();
dataRow["Name"] = aEditor.edtName.Text;
dtMovieTypes.Rows.Add(dataRow);
//now datagridviewTypes.Select() not works
//I need something like datagridviewTypes.Locate(dataRow)
//to synchronize grid and dataset
};
aEditor.Dispose();
}
Thanks in advance
Peter