By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,257 Members | 925 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,257 IT Pros & Developers. It's quick & easy.

ListView that allows the user to edit it contents???

P: n/a
Hello,

how can I create a ListView that allows to user to edit its columns contents?
Thx.
Bob Rock
Nov 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi Bob,
Listview has a LabelEdit property; when you set it "true", then in an event handler you can call Listview.Items[x].BeginEdit(), and edit an item. As an example, you can handle ListView.DoubleClick event and call BeginEdit right there:

private void Form1_Load(object sender, System.EventArgs e)
{
listView1.LabelEdit = true;
}

private void listView1_DoubleClick(object sender, System.EventArgs e)
{
if(this.listView1.SelectedItems.Count==1)
{
this.listView1.SelectedItems[0].BeginEdit();
}
}

I hope this will help you,
Good Luck
-------------
Dincer Ozturan
"Bob Rock" wrote:
Hello,

how can I create a ListView that allows to user to edit its columns contents?
Thx.
Bob Rock

Nov 16 '05 #2

P: n/a
bob
you could try this:
http://www.codeproject.com/cs/miscct...ridcontrol.asp
"Dincer Ozturan" <Di***********@discussions.microsoft.com> wrote in message news:<53**********************************@microso ft.com>...
Hi Bob,
Listview has a LabelEdit property; when you set it "true", then in an event handler you can call Listview.Items[x].BeginEdit(), and edit an item. As an example, you can handle ListView.DoubleClick event and call BeginEdit right there:

private void Form1_Load(object sender, System.EventArgs e)
{
listView1.LabelEdit = true;
}

private void listView1_DoubleClick(object sender, System.EventArgs e)
{
if(this.listView1.SelectedItems.Count==1)
{
this.listView1.SelectedItems[0].BeginEdit();
}
}

I hope this will help you,
Good Luck
-------------
Dincer Ozturan
"Bob Rock" wrote:
Hello,

how can I create a ListView that allows to user to edit its columns contents?
Thx.
Bob Rock

Nov 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.