I have a ListView. When I call listview.SelectedItems[0].BeginEdit(), it is able to correct the selected item. What event needs to be called, when I end edit my item, for example, press such button as “Enter”?
At first, when the user selects ToolStripMenuItem it is occurs so event:
private void renameLocalUserToolStripMenuItem_Click(object sender, EventArgs e)
{
if (listView_ad.SelectedItems.Count > 0)
{
listView_ad.SelectedItems[0].BeginEdit();
}
}
When the user ends changing his item, he presses “enter”. And then I need to take the changed text.
Use the ‘AfterLabelEdit’ event.
MSDN AfterLabelEdit