get listview items

3 posts, 0 answers
  1. Sam
    Sam avatar
    14 posts
    Member since:
    Sep 2012

    Posted 30 Sep 2012 Link to this post

    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. Sam
    Sam avatar
    14 posts
    Member since:
    Sep 2012

    Posted 01 Oct 2012 Link to this post

    The problem is solved!
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 02 Oct 2012 Link to this post

    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 >>
Back to Top