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.
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.
Comments
Relevant code below.
ColumnList=""
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
BackColour="PowderBlue"
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)
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.
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.
What was the cause?
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.