Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Generic UserControl

Status
Not open for further replies.

jose74

Programmer
Feb 10, 2005
16
AT
In my application I use a usercontrol that contains a grid and buttons for paging functionality. The user can specify how many items he wants to see per page. To use custom objects I used generic lists which contain the items. So the control contains two collections:
List<Article> _wholeCollection;
List<Article> _shownCollection;

The problem is, that I want to use the control for several modules, e.g. Addresses.

But what do I have to do with the collections? It should be possible to create a generic usercontrol(ListCtrl<Article>).

Has anyone ideas how to create something like that?
 
So you want to have a generic list, that can display any type of information such as name or address?

What if they want multiple, like name and address?


I would make your Graphical list - a list view that contains column headers.

What you can do is expose those column headers and the items/subitems so your list works very much like a listview.

Is that something similar to what you are looking for?
 
Hi, sorry for the late response!

The problem is to work with the collections. The usercontrol contains a grid (or a listview) and buttons for paging. The paging fills the collection _shownCollection from _wholeCollection.
But I can not specifiy the type of the collectionitems.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top