Click here to Skip to main content
Licence 
First Posted 2 Sep 2004
Views 19,820
Bookmarked 8 times

TagItem

By | 2 Sep 2004 | Article
How to fill in Text and ID into same ListBox item or "Where is my ItemData".

Introduction

First ListBox control use in .NET was very confusing for me. Like, I am sure many of you, I used ItemData to fill in ID of somekind. But there is no ItemData in Kansas anymore so "Dorothy" had to find another solution.

It took me some time to see that new "Items.Add" formula takes Object as argument. From there, everything was downhill.

By using Text and ID as an argument for constructor, this class can be successfully used to retrieve/change same information later. One additional Object argument is added for "just in case" situations.

Since talk is cheap, try the sample.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Josip Medved (unused)

Web Developer

Croatia Croatia

Member

VB programmer with MCSD status. Loves chevapi...

Medo's Home Page

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralMissing Event handler PinsussKen J2:15 13 Sep '04  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web04 | 2.5.120517.1 | Last Updated 3 Sep 2004
Article Copyright 2004 by Josip Medved (unused)
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid