Hello,
I would like to create a cCJGrid in which a single row can contains a description and a quantity in two separate lines. So I used the markup (Set ComEnableMarkup to True) as the code reported below.
It works, but as you can see from the attached screenshot there is an extra margin (in red) in the bottom of the grid line that makes the line height too big.
Has anyone any idea how to remove that margin?
Code:
Object oGrid is a cCJGrid
Set Size to 291 213
Set Location to 0 1
Set pbReadOnly to True
Set pbShowHeader to False
Set peVerticalGridStyle to xtpGridNoLines
Set pbDrawGridForEmptySpace to False
Set peAnchors to anTopBottom
Set pbShowRowFocus to True
Set pbAllowEdit to False
Set pbHeaderReorders to True
Set pbSelectionEnable to True
Set pbAllowColumnRemove to False
Set pbAllowColumnReorder to False
Procedure OnCreateGridControl
Forward Send OnCreateGridControl
Set ComEnableMarkup to True
End_Procedure
Object oColDesc is a cCJGridColumn
Set piWidth to 362
Set pbVisible to False
Set pbShowInFieldChooser to False
End_Object
Object oColQta is a cCJGridColumn
Set piWidth to 362
Set pbVisible to False
Set pbShowInFieldChooser to False
End_Object
Object oColColor is a cCJGridColumn
Set piWidth to 3
Set psCaption to ""
Set pbResizable to False
Set pbEditable to False
Set pbFocusable to False
End_Object
Object oColVisible is a cCJGridColumn
Set piWidth to 277
Set pbMultiLine to True
Procedure OnSetDisplayMetrics Handle hoGridItemMetrics Integer iRow String ByRef sValue
Number nQta
String sDescr
Get RowValue of oColDesc iRow to sDescr
Get RowValue of oColQta iRow to nQta
Move ('<StackPanel>'+ ;
'<TextBlock TextTrimming="CharacterEllipsis">' +;
'<Span FontSize="16"> '+(Left((Trim(sDescr)),30))+'</Span>'+ ;
'</TextBlock>' +;
'<TextBlock TextAlignment="Right">' + (String(nQta))+ '</TextBlock>' +;
'</StackPanel>') to sValue
End_Procedure
End_Object