Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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 at 17-Aug-12 13:43pm
   
WinForm or WPF, It dosent really matter if is binded in code behind though.
Shankar23G at 17-Aug-12 13:46pm
   
I can't understand what you said?
Wes Aday at 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
0 OriginalGriff 620
1 Maciej Los 610
2 CPallini 255
3 RyanDev 161
4 Peter Leow 125
0 OriginalGriff 5,784
1 Sergey Alexandrovich Kryukov 4,838
2 Peter Leow 3,009
3 Maciej Los 2,894
4 DamithSL 2,465


Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 19 Aug 2012
Copyright © CodeProject, 1999-2014
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