however the combo box does not respond to my clicks ( does not display any values )
see my sample code below
the same code is for a new combo box , but the requirement is for a imported one from 6513 ( I have already moved it to my new plugin from Legacy )
interestingly the grid manager shows the custom field name as PluginName.fieldname
- Code: Select all
Public Class CustomFieldPlugin
Inherits System.MarshalByRefObject
Implements JiwaApplication.IJiwaCustomFieldPlugin
Public Overrides Function InitializeLifetimeService() As Object
' returning null here will prevent the lease manager
' from deleting the Object.
Return Nothing
End Function
Public Sub FormatCell(ByVal BusinessLogicHost As JiwaApplication.IJiwaBusinessLogic, ByVal GridObject As JiwaApplication.Controls.JiwaGrid, ByVal FormObject As JiwaApplication.IJiwaForm, ByVal Col As Integer, ByVal Row As Integer, ByVal HostObject As JiwaApplication.IJiwaCustomFieldValues, ByVal CustomField As JiwaApplication.CustomFields.CustomField, ByVal CustomFieldValue As JiwaApplication.CustomFields.CustomFieldValue) Implements JiwaApplication.IJiwaCustomFieldPlugin.FormatCell
'If CustomField.PluginCustomField.Name = "ALL_CUSTOM_FIELDS.TestCombo" Then ' -- so lines
If CustomField.PluginCustomField.Name = "TestCombo" Then ' -- so lines
Dim MyDisplayItems As New List(Of String)
Dim MyUnderlyingValues As New List(Of String)
MyDisplayItems.Add("One des")
MyDisplayItems.Add("Two des")
MyDisplayItems.Add("Three des ")
MyUnderlyingValues.Add("One")
MyUnderlyingValues.Add("Two")
MyUnderlyingValues.Add("Three")
DirectCast(GridObject.Activesheet.Cells(Row, Col).CellType, FarPoint.Win.Spread.CellType.ComboBoxCellType).EditorValue = FarPoint.Win.Spread.CellType.EditorValue.ItemData
DirectCast(GridObject.Activesheet.Cells(Row, Col).CellType, FarPoint.Win.Spread.CellType.ComboBoxCellType).Items = MyDisplayItems.ToArray
DirectCast(GridObject.Activesheet.Cells(Row, Col).CellType, FarPoint.Win.Spread.CellType.ComboBoxCellType).ItemData = MyUnderlyingValues.ToArray
End If
DirectCast(GridObject.Activesheet.Cells(Row, Col).CellType, FarPoint.Win.Spread.CellType.ComboBoxCellType).EditorValue = FarPoint.Win.Spread.CellType.EditorValue.ItemData
DirectCast(GridObject.Activesheet.Cells(Row, Col).CellType, FarPoint.Win.Spread.CellType.ComboBoxCellType).Items = MyDisplayItems.ToArray
DirectCast(GridObject.Activesheet.Cells(Row, Col).CellType, FarPoint.Win.Spread.CellType.ComboBoxCellType).ItemData = MyUnderlyingValues.ToArray
End If
End Sub
Public Sub ReadData(ByVal BusinessLogicHost As JiwaApplication.IJiwaBusinessLogic, ByVal GridObject As JiwaApplication.Controls.JiwaGrid, ByVal FormObject As JiwaApplication.IJiwaForm, ByVal Row As Integer, ByVal HostObject As JiwaApplication.IJiwaCustomFieldValues, ByVal CustomField As JiwaApplication.CustomFields.CustomField, ByVal CustomFieldValue As JiwaApplication.CustomFields.CustomFieldValue) Implements JiwaApplication.IJiwaCustomFieldPlugin.ReadData
End Sub
Public Sub ButtonClicked(ByVal BusinessLogicHost As JiwaApplication.IJiwaBusinessLogic, ByVal GridObject As JiwaApplication.Controls.JiwaGrid, ByVal FormObject As JiwaApplication.IJiwaForm, ByVal Col As Integer, ByVal Row As Integer, ByVal HostObject As JiwaApplication.IJiwaCustomFieldValues, ByVal CustomField As JiwaApplication.CustomFields.CustomField, ByVal CustomFieldValue As JiwaApplication.CustomFields.CustomFieldValue) Implements JiwaApplication.IJiwaCustomFieldPlugin.ButtonClicked
End Sub
End Class


