Results 1 to 1 of 1

Thread: cCJGrid and markup

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2014
    Location
    Italy
    Posts
    219

    Default cCJGrid and markup

    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
    




    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	markup-grid.PNG 
Views:	113 
Size:	4.3 KB 
ID:	12888  

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •