Click here to Skip to main content
15,907,687 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Visual Basic Sequential File IO Pin
Red Sunday15-Sep-04 7:12
Red Sunday15-Sep-04 7:12 
GeneralRe: Visual Basic Sequential File IO [EDITED] Pin
Dave Kreskowiak15-Sep-04 8:03
mveDave Kreskowiak15-Sep-04 8:03 
GeneralRe: Visual Basic Sequential File IO [EDITED] Pin
Red Sunday15-Sep-04 8:14
Red Sunday15-Sep-04 8:14 
GeneralRe: Visual Basic Sequential File IO [EDITED] Pin
Dave Kreskowiak15-Sep-04 9:01
mveDave Kreskowiak15-Sep-04 9:01 
GeneralReturning Integer value from a VB (NOT .Net) Command line application Pin
Jobby Joseph15-Sep-04 3:54
Jobby Joseph15-Sep-04 3:54 
GeneralRe: Returning Integer value from a VB (NOT .Net) Command line application Pin
Dave Kreskowiak15-Sep-04 4:22
mveDave Kreskowiak15-Sep-04 4:22 
GeneralRe: Returning Integer value from a VB (NOT .Net) Command line application Pin
Jobby Joseph15-Sep-04 4:37
Jobby Joseph15-Sep-04 4:37 
GeneralDropdownlist Pin
jr121415-Sep-04 2:53
jr121415-Sep-04 2:53 
I have code that populates a dropdownlist control from a dataset. The dataset has two fields; one I assign to 'text' and one to 'value'. This all works great. My pull down list functionality works as advertised. PROBLEM is when I open the page, I populate all the controls with the value from the record that the page is displaying...The ddl value is assigned to the control in the code which loads the contols (witnessed by stepping throught the code, but the value that gets displayed in the Dropdownlist is always the 0 index item (first one in the dataset) and not the value assigned to it in the code assignments of the data record. I have tried assigning the value from the data table to a variable and then 'findbyvalue = to that variable', but no luck. I have searched the high seas for references to the use of the ddl, which funny enough seems to be elusive. For such a valuable/oft used control,in VB GUI, I would hope to find something that addresses the full use of the control . I mean 4GuysFromRolla did a million part series on the datagrid, but not even a page on the ddl? can anyone help me ?

I am getting my dataset from the global asa and populating the ddl
If Not IsPostBack Then
dsCBO = Application.Get("dsPhysCBO")
Me.ddlPMD.DataSource = dsCBO
Me.ddlPMD.DataTextField = "PhysLast"
Me.ddlPMD.DataValueField = "PUID"
Me.ddlPMD.DataBind()
no problem!

I get a datareader to populate the fields on the form and assign the stored value to the ddl
Me.ddlPMD.SelectedItem.Value = reader("PriMD").ToString

At this point (stepping through the code) value="PriMD"
still no problem.

I try to place the index of the ddl to the value passed in using a variable populated with "PriMD" a string myKey2
Me.ddlPMD.Items.FindByValue(myKey2.ToString).Selected = True

When the page displays...the text displayed in the ddl is that for the first item in the ddl dataset, not the text corresponding to the value of myKey2

Where do I error???
JR
GeneralRe: Dropdownlist Pin
Purple Monk16-Sep-04 1:27
Purple Monk16-Sep-04 1:27 
GeneralRe: Dropdownlist Pin
jr121416-Sep-04 3:56
jr121416-Sep-04 3:56 
Generalprinting contents behind scrollbar Pin
vjer00114-Sep-04 19:12
vjer00114-Sep-04 19:12 
GeneralAdjusting PictureBox contrast/brightness Pin
Jason2314-Sep-04 14:29
Jason2314-Sep-04 14:29 
GeneralRe: Adjusting PictureBox contrast/brightness Pin
Anonymous14-Sep-04 18:24
Anonymous14-Sep-04 18:24 
GeneralConnecting to Oracle database Pin
pathuknown14-Sep-04 10:49
pathuknown14-Sep-04 10:49 
GeneralRe: Connecting to Oracle database Pin
Anonymous14-Sep-04 18:30
Anonymous14-Sep-04 18:30 
General.NET and Integer, Long, and Short Pin
GregOsborne14-Sep-04 10:05
GregOsborne14-Sep-04 10:05 
GeneralRe: .NET and Integer, Long, and Short Pin
Charlie Williams14-Sep-04 10:26
Charlie Williams14-Sep-04 10:26 
GeneralRe: .NET and Integer, Long, and Short Pin
GregOsborne14-Sep-04 16:28
GregOsborne14-Sep-04 16:28 
GeneralRe: .NET and Integer, Long, and Short Pin
Charlie Williams14-Sep-04 17:38
Charlie Williams14-Sep-04 17:38 
GeneralRe: .NET and Integer, Long, and Short Pin
Greg Osborne21-Sep-04 10:10
Greg Osborne21-Sep-04 10:10 
GeneralGetIfTable and VB.NET Pin
andrew|14-Sep-04 5:46
andrew|14-Sep-04 5:46 
QuestionHow to select the the Launch Conditions in View menu? Pin
ATC14-Sep-04 4:29
ATC14-Sep-04 4:29 
GeneralPROGRAM HELP!!! Pin
ISUstudent14-Sep-04 4:17
ISUstudent14-Sep-04 4:17 
GeneralRe: PROGRAM HELP!!! Pin
Dave Kreskowiak14-Sep-04 4:51
mveDave Kreskowiak14-Sep-04 4:51 
GeneralWorking with a database Pin
Britnt714-Sep-04 2:14
Britnt714-Sep-04 2:14 

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

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