Click here to Skip to main content
13,144,679 members (35,596 online)
Click here to Skip to main content


26 bookmarked
Posted 14 May 2009

Extending the ListViewItem

, 14 May 2009
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 ListViewColumnAttribute : Attribute
        private string _columnName;

        public ListViewColumnAttribute(string columnName)
            _columnName = columnName;

        public override string ToString()
            return _columnName;

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
Web04 | 2.8.170915.1 | Last Updated 14 May 2009
Article Copyright 2009 by flavius.stoichescu
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid