Click here to Skip to main content
12,304,734 members (64,058 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C#2.0 C# Windows .NET Beginner , +
I have a listview with three columns and i have added 4 records in the listview.
I would like to get the value of the 2nd column value of each records.How to implement it?
Posted 17-Aug-12 7:32am
Comments
Kenneth Haugland 17-Aug-12 13:43pm
   
WinForm or WPF, It dosent really matter if is binded in code behind though.
Shankar23G 17-Aug-12 13:46pm
   
I can't understand what you said?
Wes Aday 17-Aug-12 14:08pm
   
What is it that you have tried?

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

you can try this code

int i=0;
while (i < listView1.SelectedItems.Count)
{
               x = listView1.Items[i].SubItems[1].Text.ToString();
               i++;
}

Try and revert back
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160530.1 | Last Updated 19 Aug 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100