TreeListView

Title: A Simple Tree List View Author: Vivek Ragunathan Email: KenBase@GMAIL.com Member ID: 505941 Language: C++ Platform: Windows Level: Intermediate Description: The windows forms list view control extended to support adding ListViewItem(s)

as child to other ListViewItems(s) providing a tree functionality. Section: C# - Windows Forms - Custom Controls License: CPOL

  • Download source - 1.96 KB

INTRODUCTION

Many times Microsoft makes us feel deprived despite the ....

We might have seen such types of controls before. Although there are different names given to this type of control, in the context of this article (and in general I believe) the control can be of two types. This categorization is based on the functionality offered and not on the view. So the two types of the control are as follows:-

    • Tree List View (TLV) - A control like the ListView (in its Details style mode) that offers the facility of adding items as child to other items in the control so that a tree structure can be established. The items can be decorated with minor things like checkboxes or images. This type of control does not offer the facility of in-place editing. That means it does not offer the facility of popping up a corresponding or associated control with each (sub)item for modifying the value associated with the (sub)item, while it is in edit mode(?).

    • Tree Grid - I believe, by now, you would have understand what this type of control has to offer - everything that the Tree List View does and does not offer.

The context of this article will stick to Tree List View. But then why have I named the control 'Simple Tree List View'? It means our control will offer the TLV functionalities in a way I would say conservative, not restricted.