This is a migrated thread and some comments may be shown as answers.

get listview items

2 Answers 170 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Sam
Top achievements
Rank 1
Sam asked on 30 Sep 2012, 05:02 PM
I've got 4 columns in my radListView1. I've added there 4 lines(4 items for each column).
But I can't get data from it. When I want to iterate through listview the property [text] is always the empty string.

List<string> list = new List<string>();
foreach (var item in radListView1.Items)
{
       string line = item.Text;
       list.Add(line);
}
return list;

Is there other way to retrieve values from ListView?

2 Answers, 1 is accepted

Sort by
0
Sam
Top achievements
Rank 1
answered on 01 Oct 2012, 08:03 PM
The problem is solved!
0
Stefan
Telerik team
answered on 02 Oct 2012, 08:14 AM
Hello Sam,

I am glad to hear that you have solved your problem. Feel free to share the solution in this thread so other users can benefit from it.
 
Regards,
Stefan
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Tags
ListView
Asked by
Sam
Top achievements
Rank 1
Answers by
Sam
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or