在gridview中执行编辑操作时限制任何操作 [英] Restrict any operation when performing edit operation in gridview
本文介绍了在gridview中执行编辑操作时限制任何操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我具有gridview控件,并且具有作为页脚模板中的子控件nd的编辑和删除按钮.我具有添加按钮.如果执行编辑操作,则添加按钮应该不可见.请帮助
Hi,
i have gridview control and i have edit and delete buttons as childcontrols nd in footer template i have add button.If i perform Edit Operation Add button should invisible.can u please help
推荐答案
private void dataGridView1_CellBeginEdit(object sender, DataGridViewCellCancelEventArgs e)
{
btnadd.Enabled = false;
}
private void dataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs e)
{
btnadd.Enabled = true;
}
这篇关于在gridview中执行编辑操作时限制任何操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文