how to determine datagridview current state (insert - edit - display) mode vs2008 windows app [closed]
how to determine datagridview current state (insert - edit - display) mode vs2008 windows applications
trans_dBindingSource.EndEdit();
if (stock_dataset.trans_d.GetChanges(DataRowState.Added) != null)
{
saveToolStripButton.PerformClick();
}
if (stock_dataset.trans_d.GetChanges(DataRowState.Modified) != null)
{
saveToolStripButton.PerformClick();
}
if (stock_dataset.trans_d.GetChanges(DataRowState.Unchanged) != null)
{
return;
}
bindingsource.endedit();
if(dataset.datatable.getchanges(datarowstate.added) != null)
{
add mode
}
bindingsource.endedit();
if(dataset.datatable.getchanges(datarowstate.modefied) != null)
{
modify mode
}
bindingsource.endedit();
if(dataset.datatable.getchanges(datarowstate.unchanged) != null)
{
no changes mode
}
精彩评论