Click here to Skip to main content
15,886,963 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Question[Message Deleted] Pin
r_williams_8416-Apr-08 21:33
r_williams_8416-Apr-08 21:33 
GeneralRe: DLL Registration Pin
Dave Kreskowiak17-Apr-08 3:24
mveDave Kreskowiak17-Apr-08 3:24 
GeneralRe: DLL Registration Pin
r_williams_8417-Apr-08 13:00
r_williams_8417-Apr-08 13:00 
QuestionSecurity Policy Pin
Tauseef A16-Apr-08 19:25
Tauseef A16-Apr-08 19:25 
GeneralRe: Security Policy Pin
Dave Kreskowiak17-Apr-08 3:22
mveDave Kreskowiak17-Apr-08 3:22 
GeneralProblems updating database Pin
AAGTHosting16-Apr-08 9:49
AAGTHosting16-Apr-08 9:49 
GeneralRe: Problems updating database Pin
Dave Kreskowiak16-Apr-08 11:15
mveDave Kreskowiak16-Apr-08 11:15 
GeneralUsing SelectedItem to have pre select item in combo box Pin
AAGTHosting16-Apr-08 8:10
AAGTHosting16-Apr-08 8:10 
I have a list view and when the user selects an item in the list view there is a combo box that has a list of teacher names in it. I am trying to pre select a teacher name when the user click on the item in the list view, but the teacher name is not changing when the user clicks on the item in the list view. I hard coded a selectedValue which is the teacher id to see if the teacher name would change in the combo box and it did.

Here is my code. Why is this happening?

Private Sub lvwSelectLess_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As MouseEventArgs) Handles lvwSelectLess.MouseDown
        grpBxLessonInfo.Visible = True
        Dim dt As New DataTable()
        Dim lvwItems As New ListViewItem()
        Dim selection As ListViewItem = lvwSelectLess.GetItemAt(e.X, e.Y)

        If (selection IsNot Nothing) Then
            MsgBox(selection.SubItems(4).Text)
            cboSelectTeacher.SelectedItem = selection.SubItems(4).Text ' this si the line of code to set a pre selected item in the combo box.

            txtInstrument.Text = selection.SubItems(3).Text
            lblStartDate.Text = selection.SubItems(5).Text
            dtpEndDate.Text = selection.SubItems(6).Text
        End If
    End Sub

GeneralRe: Using SelectedItem to have pre select item in combo box Pin
Dave Kreskowiak16-Apr-08 8:38
mveDave Kreskowiak16-Apr-08 8:38 
QuestionModifying XML Nodes Pin
CocaColaBoy16-Apr-08 6:46
CocaColaBoy16-Apr-08 6:46 
GeneralRe: Modifying XML Nodes Pin
Dave Kreskowiak16-Apr-08 8:41
mveDave Kreskowiak16-Apr-08 8:41 
GeneralRe: Modifying XML Nodes Pin
CocaColaBoy16-Apr-08 8:52
CocaColaBoy16-Apr-08 8:52 
GeneralRe: Modifying XML Nodes Pin
Dave Kreskowiak16-Apr-08 9:23
mveDave Kreskowiak16-Apr-08 9:23 
GeneralRe: Modifying XML Nodes Pin
CocaColaBoy16-Apr-08 10:08
CocaColaBoy16-Apr-08 10:08 
GeneralRe: Modifying XML Nodes Pin
Dave Kreskowiak16-Apr-08 11:06
mveDave Kreskowiak16-Apr-08 11:06 
GeneralRe: Modifying XML Nodes Pin
CocaColaBoy16-Apr-08 11:38
CocaColaBoy16-Apr-08 11:38 
GeneralRe: Modifying XML Nodes Pin
CocaColaBoy16-Apr-08 11:55
CocaColaBoy16-Apr-08 11:55 
GeneralRe: Modifying XML Nodes Pin
Luc Pattyn16-Apr-08 12:13
sitebuilderLuc Pattyn16-Apr-08 12:13 
GeneralRe: Modifying XML Nodes Pin
Dave Kreskowiak17-Apr-08 3:00
mveDave Kreskowiak17-Apr-08 3:00 
QuestionServiceProcessInstaller account? Pin
AHeavey16-Apr-08 5:57
AHeavey16-Apr-08 5:57 
AnswerRe: ServiceProcessInstaller account? Pin
Dave Kreskowiak16-Apr-08 6:37
mveDave Kreskowiak16-Apr-08 6:37 
GeneralRe: ServiceProcessInstaller account? Pin
AHeavey16-Apr-08 6:39
AHeavey16-Apr-08 6:39 
Generalbound combobox... Pin
sabr4916-Apr-08 3:43
sabr4916-Apr-08 3:43 
GeneralRe: bound combobox... Pin
Dave Kreskowiak16-Apr-08 4:13
mveDave Kreskowiak16-Apr-08 4:13 
GeneralRe: bound combobox... Pin
sabr4916-Apr-08 4:54
sabr4916-Apr-08 4:54 

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.