Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Scroll plays about with cell data

Vertical scroll up when already at the top of the scroll position causes random numbers to display zero.
Does not seem like any particular cell, just random, but only the number fields, and it seems like the low value fields, eg 0.0347
Scroll a bit more and they display OK or another cell changes, or make the form lose and regain focus and all is OK.

Peculiar, and not urgent.


  • I've seen this behavior also, so I'm interested in how to resolve it.
  • Can you post the setup parameters for that column? I'm trying to recreate this, but I'm having a hard time.
  • Hi
    Relevant code below.

    ColumnList<-1>="Id" :@VM:"Number" :@VM:"50" :@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:@VM:"Left":@VM:@VM:"#"
    ColumnList<-1>="Group" :@VM:"Text" :@VM:"100":@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:@VM:"Left"
    ColumnList<-1>="Process" :@VM:"Text" :@VM:"120":@VM:0:@VM:1:@VM:0:@VM:1:@VM:1:@VM:@VM:"Left"
    ColumnList<-1>="Process Description" :@VM:"Text" :@VM:"200":@VM:0:@VM:1:@VM:0:@VM:1:@VM:1:@VM:@VM:"Left"
    ColumnList<-1>="Process Code/Description" :@VM:"Text" :@VM:"200":@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:@VM:"Left"
    ColumnList<-1>="Element" :@VM:"Text" :@VM:"100":@VM:0:@VM:1:@VM:0:@VM:1:@VM:1:@VM:@VM:"Left"
    ColumnList<-1>="Element Description" :@VM:"Text" :@VM:"200":@VM:0:@VM:1:@VM:0:@VM:1:@VM:1:@VM:@VM:"Left"
    ColumnList<-1>="Element Code/Description" :@VM:"Text" :@VM:"200":@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:@VM:"Left"
    ColumnList<-1>="Element Trade" :@VM:"Text" :@VM:"100":@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:@VM:"Left"
    ColumnList<-1>="Main Heading" :@VM:"Text" :@VM:"200":@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:@VM:"Left"
    ColumnList<-1>="Sub Heading 1" :@VM:"Text" :@VM:"200":@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:@VM:"Left"
    ColumnList<-1>="Sub Heading 2" :@VM:"Text" :@VM:"200":@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:@VM:"Left"
    ColumnList<-1>="Sub Heading 3" :@VM:"Text" :@VM:"200":@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:@VM:"Left"
    ColumnList<-1>="Item Description" :@VM:"Text" :@VM:"200":@VM:1:@VM:1:@VM:0:@VM:1:@VM:0:@VM:@VM:"Left"
    ColumnList<-1>="Unit" :@VM:"Text" :@VM:"70" :@VM:1:@VM:1:@VM:0:@VM:1:@VM:1:@VM:@VM:"Center"
    ColumnList<-1>="Quantity" :@VM:"Number" :@VM:"70" :@VM:1:@VM:1:@VM:0:@VM:1:@VM:1:@VM:@VM:"Right":@VM:@VM:"#.000"
    ColumnList<-1>="Estimated Rate" :@VM:"Number" :@VM:"100":@VM:0:@VM:1:@VM:0:@VM:1:@VM:1:@VM:@VM:"Right":@VM:@VM:"#,##0.00"
    ColumnList<-1>="Estimated Price" :@VM:"Number" :@VM:"100":@VM:0:@VM:1:@VM:0:@VM:1:@VM:1:@VM:@VM:"Right":@VM:@VM:"#,##0.00"
    ColumnList<-1>="Carbon Mass" :@VM:"Number" :@VM:"100":@VM:0:@VM:1:@VM:0:@VM:1:@VM:1:@VM:@VM:"Right":@VM:@VM:"#,##0.0000"
    ColumnList<-1>="Carbon Price" :@VM:"Number" :@VM:"100":@VM:0:@VM:1:@VM:0:@VM:1:@VM:1:@VM:@VM:"Right":@VM:@VM:"#,##0.0000"
    ColumnList<-1>="Complete Description" :@VM:"Preview" :@VM:"0" :@VM:1:@VM:0:@VM:0:@VM:0:@VM:1


    CALL Set_Property(OLE_TABLE,"OLE.ColumnList",ColumnList)
    CALL Set_Property(OLE_TABLE,"OLE.SortOrder",GroupOrder)
    CALL Set_Property(OLE_TABLE,"OLE.GroupPanelVisible",1)
    CALL Set_Property(OLE_TABLE,"OLE.GroupOrder",GroupOrder)
    CALL Set_Property(OLE_TABLE,"OLE.GroupRowsShaded",1)
    CALL Set_Property(OLE_TABLE,"OLE.FooterVisible",1)
    CALL Set_Property(OLE_TABLE,"OLE.HeaderVisible",1)
    CALL Set_Property(OLE_TABLE,"OLE.PreviewMode",1)
    CALL Set_Property(OLE_TABLE,"OLE.MultiSelect",1)
    CALL Set_Property(OLE_TABLE,"OLE.VerticalGridStyle","Solid")
    CALL Set_Property(OLE_TABLE,"OLE.HorizontalGridStyle","DotSmall")
    CALL Set_Property(OLE_TABLE,"OLE.HorizontalScroll",1)
    CALL Set_Property(OLE_TABLE,"OLE.BackColor",BackColour)
    CALL Set_Property(OLE_TABLE,"OLE.GroupRowContextMenuEnabled",0)
    CALL Set_Property(OLE_TABLE,"OLE.PreviewMode",0)
  • Well, I've tried using similar values and your same settings, but I can't get this to happen. Is this in SRP FrameWorks or at least in a promoted events environment?
  • It is all just code within the Omnievent on the form.
    In case its relevant the entire code is attached.
    My gut feeling is that it is related to the dec places and pattern, could be wrong, that is just my guess.
    Could be worth trying some small values, such as 1000 rows.
    For val=0 to 1 step .001 (or whatever makes sense)

    It also only happens with quite a few rows, so that you get several pages.
  • Does it happen right away, or only after you "vertical scroll up when already at the top of the scroll position?"
  • Good question.
    I just tried this, doing a refresh, which redisplays, and repeating over and over.
    The same thing happens.
    As such it seems its nothing to do with the scrolling. Sorry for the confusion.
    I will Email a video.
  • Thanks a bunch for the emails. It turns out to be one of these annoying bugs that only occur in the Release build, not the Debug build. Needless to say, debugging this will be a challenge. I'll let you know when I've got a fix.
  • Thanks, good luck.
  • Okay, guys. Download 4.1.5 RC3 and see if it's all better now.
  • All good now, thanks Kevin.
    What was the cause?
  • To be honest, I'm not entirely sure since I couldn't really debug it. It might have been the API that converts a C++ double into a string of digits misbehaving... but I couldn't confirm since it would happen off and on.

    My solution was to switch from internally using C++ double for Number typed columns to using the same underlying structure as SRP_Math. This means there is the added benefit of no longer losing decimal precision between OI and the table, which can happen when you go from base 10 to a double using IEEE-754 base 2 exponents, which the Microsoft C++ runtime uses.
  • Wishing I hadn't asked now. :)
Sign In or Register to comment.