Euro Sign in cCJGrid
<< Back
If you ever want to turn your VDF app into ANSI compliance (not Unicode, dream small), you might attempt
to turn the OEM_Translate_State to False for every single UI object. Unfortunately for cCJGrid, which is
an ActiveX control, doesn't support OEM_Translate_State. All Flexml and FlexCom2 objects are dealing with
OEM character set exclusively. So, how would you display ANSI only characters (for example, the Euro sign)
in the "new and improved" cCJGrid?
Object oColumn is a cCJGridColumn
Function FormatDisplayValue String ByRef sValue Returns Boolean
Boolean bResult
Forward Get FormatDisplayValue (&sValue) to bResult
Function_Return True
End_Function
Function CustomEditObject Returns Handle
Handle hEdit
Forward Get CustomEditObject to hEdit
Set OEM_Translate_State of hEdit to False
Function_Return hEdit
End_Function
End_Object
The FormatDisplayValue basically ignores the return value from the "Forward Send". By returning
"True", it basically tells the cCJGrid that I am returning ANSI data for display purpose.
The CustomeEditObject is to force the Edit (Form) control to be ANSI for edit purpose.
Since whenever the cCJGrid goes into Edit mode, it will dynamically create a Form control to allow
the user to edit the content of the cell.