Click here to Skip to main content
15,916,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi every one

i am using listview control.i want to edit columns in listview.for this i have return the below code.But this is working for first column only.i need to edit second or thrid column.how to do it.
can any one help me please

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

          }
      }
Posted

1 solution

What below code do?
C#
this.listView1.SelectedItems[0].BeginEdit();

Please, find out here: ListView.SelectedItems Property[^]

If you want to edit particular cell (item), please refer this: ListViewItem[^]

For further information, please see:
ListView Class[^]
ListView with Editing Capability Sample[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900