|
-
Aug 25th, 2012, 08:43 PM
#1
Thread Starter
Member
Help with CBO Please
Hello all,
I need a cbo I created to pull info from a database, and I need it to display the text that is from the database. I know the code to do this, however when I go to type into code, there is no option from the drop down list to chose from it so it won't let me chose it. The code I need to write is
Code:
cb.DataTextField = "PLAYER_NAME"
but VS isn't recognizing the "DataTextField part. Does anyone know why this might be happening to me? Thanks in advance.
-
Aug 25th, 2012, 09:20 PM
#2
Re: Help with CBO Please
You might try posting clearly in future. By "cbo" do you actually mean ComboBox? If so then the reason Intellisense doesn't show you a DataTextField property is that there is no such property on that class. Did you consider reading the documentation for the ComboBox class to see what properties it does have? If you had you would see that the property you want is DisplayMember. Perhaps DataTextField is the equivalent property in VB6 but VB.NET is not VB6 so, while the syntax is basically the same, don't assume that anything else will and just consider it a bonus if they are.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|