R
RSH
I have a situation where I am creating a class (oValue) that contains two
properties "Name" and "Value".
I am using a thrid party grid control which has a DropDownList Control. The
PopulateValueList function takes 3 arguments a list,the name field, and the
value field.
My issue outlined in the code below is that I am adding my Object reference
to the list, and then trying to specify the text and value fields (see the
arrow below). The problem is that when I run the page I get "oValue" for
the display text in each row. How do I correctly reference the Name
property, and the Value property when sending the values to the
PopulateValueList function?
Thanks!
Ron
Dim oList As New ArrayList
Dim oVal As oValue
oVal = New oValue("Full Time", "Full Time")
oList.Add(oVal)
oVal = New oValue("Part Time", "Part Time")
oList.Add(oVal)
Dim valList As Janus.Web.GridEX.GridEXValueListItemCollection
valList = column.ValueList
valList.PopulateValueList(oList, oVal.Name, oVal.Value) <--------------
Public Class oValue
Private mValue As String
Public Property Value() As String
Get
Return mValue
End Get
Set(ByVal Value As String)
mValue = Value
End Set
End Property
Private mName As String
Public Property Name() As String
Get
Return mName
End Get
Set(ByVal Value As String)
mName = Value
End Set
End Property
Public Sub New(ByVal id As String, ByVal name As String)
mName = name
mValue = id
End Sub
End Class
properties "Name" and "Value".
I am using a thrid party grid control which has a DropDownList Control. The
PopulateValueList function takes 3 arguments a list,the name field, and the
value field.
My issue outlined in the code below is that I am adding my Object reference
to the list, and then trying to specify the text and value fields (see the
arrow below). The problem is that when I run the page I get "oValue" for
the display text in each row. How do I correctly reference the Name
property, and the Value property when sending the values to the
PopulateValueList function?
Thanks!
Ron
Dim oList As New ArrayList
Dim oVal As oValue
oVal = New oValue("Full Time", "Full Time")
oList.Add(oVal)
oVal = New oValue("Part Time", "Part Time")
oList.Add(oVal)
Dim valList As Janus.Web.GridEX.GridEXValueListItemCollection
valList = column.ValueList
valList.PopulateValueList(oList, oVal.Name, oVal.Value) <--------------
Public Class oValue
Private mValue As String
Public Property Value() As String
Get
Return mValue
End Get
Set(ByVal Value As String)
mValue = Value
End Set
End Property
Private mName As String
Public Property Name() As String
Get
Return mName
End Get
Set(ByVal Value As String)
mName = Value
End Set
End Property
Public Sub New(ByVal id As String, ByVal name As String)
mName = name
mValue = id
End Sub
End Class