Click here to Skip to main content
15,895,011 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Access Is Denied while checking process terminated or not. Pin
Luc Pattyn7-Sep-09 8:09
sitebuilderLuc Pattyn7-Sep-09 8:09 
GeneralRe: Access Is Denied while checking process terminated or not. Pin
Gagan.207-Sep-09 16:48
Gagan.207-Sep-09 16:48 
GeneralRe: Access Is Denied while checking process terminated or not. Pin
Luc Pattyn8-Sep-09 0:38
sitebuilderLuc Pattyn8-Sep-09 0:38 
GeneralRe: Access Is Denied while checking process terminated or not. Pin
Gagan.208-Sep-09 0:46
Gagan.208-Sep-09 0:46 
GeneralRe: Access Is Denied while checking process terminated or not. Pin
Luc Pattyn8-Sep-09 1:05
sitebuilderLuc Pattyn8-Sep-09 1:05 
QuestionDisplay one value in combobox, but use another. Pin
Nielvh7-Sep-09 2:00
Nielvh7-Sep-09 2:00 
AnswerRe: Display one value in combobox, but use another. Pin
Luc Pattyn7-Sep-09 2:44
sitebuilderLuc Pattyn7-Sep-09 2:44 
GeneralRe: Display one value in combobox, but use another. Pin
Nielvh7-Sep-09 23:21
Nielvh7-Sep-09 23:21 
OK, I think I managed to create the class and it seems to work, except when I have names in the combobox that are identical. Say I have values John(1), Paul(2), John(3). When I select the first John other fields on the form is refreshed using the correct value (1). When I select the second John it also works fine using the correct value (3). The problem is when I leave the comboxfield another SelectedIndexChange is fired and the value then changes to (1). When I select Paul I have no problem.
Here is the class I created - I copied the format from sample code:
Public Class myLookupClass
    Private iID As Integer
    Private sValue As String

    Public Sub New(ByVal DisplayValue As String, ByVal ID As Integer)
        iID = ID
        sValue = DisplayValue
    End Sub

    Public Property GetLookup() As Integer
        Get
            Return iID
        End Get
        Set(ByVal value As Integer)
            sValue = value
        End Set
    End Property

    Public Overrides Function ToString() As String
        'Return MyBase.ToString()
        Return sValue
    End Function
End Class


I populate the combobox like this
While datareader.Read()
                    ContactNameField.Items.Add( _
                    New myLookupClass((datareader.Item("cDisplayName")), _
                    (datareader.Item("idPeople"))))
                End While


Any thoughts on were I am going wrong?
GeneralRe: Display one value in combobox, but use another. Pin
Johan Hakkesteegt7-Sep-09 23:40
Johan Hakkesteegt7-Sep-09 23:40 
GeneralRe: Display one value in combobox, but use another. Pin
Nielvh8-Sep-09 0:01
Nielvh8-Sep-09 0:01 
GeneralRe: Display one value in combobox, but use another. Pin
Johan Hakkesteegt8-Sep-09 0:11
Johan Hakkesteegt8-Sep-09 0:11 
GeneralRe: Display one value in combobox, but use another. Pin
Nielvh8-Sep-09 0:21
Nielvh8-Sep-09 0:21 
GeneralRe: Display one value in combobox, but use another. Pin
Johan Hakkesteegt8-Sep-09 0:26
Johan Hakkesteegt8-Sep-09 0:26 
GeneralRe: Display one value in combobox, but use another. Pin
Nielvh8-Sep-09 0:37
Nielvh8-Sep-09 0:37 
QuestionThe Remote Server Returned an error :(411) Length Required Pin
dcdhingra6-Sep-09 20:49
dcdhingra6-Sep-09 20:49 
AnswerRe: The Remote Server Returned an error :(411) Length Required Pin
Hurricane30007-Sep-09 11:07
Hurricane30007-Sep-09 11:07 
GeneralRe: The Remote Server Returned an error :(411) Length Required Pin
dcdhingra8-Sep-09 4:17
dcdhingra8-Sep-09 4:17 
QuestionMore efficient way to program row visibility in VB Pin
Cardary6-Sep-09 20:35
Cardary6-Sep-09 20:35 
AnswerRe: More efficient way to program row visibility in VB Pin
Christian Graus6-Sep-09 21:35
protectorChristian Graus6-Sep-09 21:35 
AnswerRe: More efficient way to program row visibility in VB Pin
εїзεїзεїз6-Sep-09 22:00
εїзεїзεїз6-Sep-09 22:00 
AnswerRe: More efficient way to program row visibility in VB Pin
N a v a n e e t h6-Sep-09 22:33
N a v a n e e t h6-Sep-09 22:33 
Questiontelephone number word generator Pin
rbjanaki6-Sep-09 11:12
rbjanaki6-Sep-09 11:12 
AnswerRe: telephone number word generator Pin
Henry Minute6-Sep-09 11:39
Henry Minute6-Sep-09 11:39 
GeneralRe: telephone number word generator Pin
rbjanaki6-Sep-09 11:46
rbjanaki6-Sep-09 11:46 
GeneralRe: telephone number word generator Pin
Henry Minute6-Sep-09 12:17
Henry Minute6-Sep-09 12:17 

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.