开发者

ListView and BeginEdit method

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.SelectedI开发者_如何学运维tems[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


Your question is not quite clear, but I think what you need is to handle the AfterLabelEdit event.


You may be looking for the AfterLabelEdit event.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜