I'm working with a ListView
where you display the items in a cluttered list and as links . Under ListView
has the "CREATE" button to insert a new item in ListView
.
I was able to make, when I edit any list item by clicking the link button, the "CREATE" button is Enabled = false
, I did this using ItemCommand
ListView
as in the code below. The problem is that I wanted to not allow the user to do an edit of another item when it is inserting a new one, any tips?
The "CREATE" button is outside of ListView
.
protected void lvDiagnosticos_ItemCommand(object sender, ListViewCommandEventArgs e)
{
if (e.CommandName == "Edit")
{
criarDiagnostico.Enabled = false;
}
else
{
criarDiagnostico.Enabled = true;
}
}