Hi,

I'm working on a propertygrid that has two items. The value of these items has to be taken from a database table. The table contains two columns, but I only want one column data to be displayed in the propertygrid. When the user selects one value from the drop down, the corresponding value has to be recognized. Is this possible please?

Thanks

Yes this is absolutely possible. Just set an action to be performed on clicking on the dropdown menu that updates another area in your GUI with the value.

Give it a go and then post back with how you are getting along.

Thanks!

Thanks for your reply. Here's my code.

Public Class Grs

    Private m_FlC As List(Of WS.FCode)
    Private m_GrT As List(Of WS.GType)

    Public Sub New()

        m_FlC = FCode.ToList
        m_GrT = GTypes.ToList
    End Sub

    Public Property FlC() As List(Of WS.FCode)
        Get
            Return m_FlC
        End Get
        Set(ByVal value As List(Of WS.FCode))
            m_FlC = value
        End Set
    End Property

    Public Property GrT() As List(Of WS.GType)
        Get
            Return m_GrT 
        End Get
        Set(ByVal value As List(Of WS.GType))
            m_GrT  = value
        End Set
    End Property
End Class


'The code in the form that contains the PropertyGrid

    Private Sub frmSpace_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        m_Grs = New Grs()   
        PropertyGrid1.SelectedObject = m_Grs
    End Sub

Thanks

I'm looking for help in PropertyGrid. The link is for basic controls which I need.

Thanks

This article has been dead for over six months. Start a new discussion instead.