Click here to Skip to main content
12,761,780 members (43,250 online)
Click here to Skip to main content


26 bookmarked
Posted 13 May 2009

Extending the ListViewItem

, 14 May 2009 CPOL
How to extend the ListViewItem to hold an object for a row, and map it to the columns in the ListView control.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ListViewExtendedItem
    public class TestClass
        private int _id;
        private string _name;
        private DateTime _date;

        public int ID
            get { return _id; }
            set { _id = value; }
        public string Name
            get { return _name; }
            set { _name = value; }
        public DateTime Date
            get { return _date; }
            set { _date = value; }

        public TestClass(int id, string name, DateTime date)
            _id = id;
            _name = name;
            _date = date;

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


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


About the Author

Software Developer
Romania Romania
No Biography provided

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170217.1 | Last Updated 14 May 2009
Article Copyright 2009 by flavius.stoichescu
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid