How do I Increase decimal places in Inventory custom field
Trying to Increase the custom field decimal places in a inventory custom field of float type to 4 from the default 2 but my code below does not work
any help ?
any help ?
- Code: Select all
Public Sub Setup(ByVal JiwaForm As JiwaApplication.IJiwaForm, ByVal Plugin As JiwaApplication.Plugin.Plugin) Implements JiwaApplication.IJiwaFormPlugin.Setup
If TypeOf JiwaForm Is JiwaInventoryUI.InventoryMaintenanceForm Then
Dim oInvetForm As JiwaInventoryUI.InventoryMaintenanceForm= DirectCast(JiwaForm, JiwaInventoryUI.InventoryMaintenanceForm )
' Store a reference to this sales order form in the business logic
Dim formReference As New JiwaApplication.BusinessLogic.GenericObjectItem
formReference.RecID = "InventoryForm"
formReference.Object = oInvetForm
oInvetForm.Inventory.GenericObjectCollection.Add(formReference)
AddHandler oInvetForm.Inventory.ReadEnd , AddressOf InventoryReadEnd
'AddHandler oInvetForm.Inventory.CreateEnd , AddressOf InventoryCreateEnd
End If
End Sub
Private Sub InventoryReadEnd( ByVal sender As Object ,ByVal e As System.EventArgs )
Dim oInvent As JiwaInventory.Inventory = DirectCast(sender, JiwaInventory.Inventory )
Dim oInventForm As JiwaInventoryUI.InventoryMaintenanceForm = DirectCast( oInvent.GenericObjectCollection("InventoryForm").Object, JiwaInventoryUI.InventoryMaintenanceForm )
'oInventForm.grdCustomFields.GridDecimalPlaces("Sample float", -1, 4, -1)
oInventForm.CustomFieldsGrid.GridDecimalPlaces ("Sample float", -1, 4, -1)
End Sub