Peter Brooks
22-Feb-2005, 11:18 PM
Tested in both vdf7 and vdf10.1
I am using a dblist
The dbList loads ok If I check any combination of rows then they are
selected ok. I test this by adding up some values from each row. However,
the problem is once the selection is made and it is unchecked the next time
you make a selection (from any row) that row is the only recognised
selection, even though the dbList may have 10 other selected rows. They
still remain highlighted.
I have stripped my dblist to bare bones - it started off with a selectable
checkbox.
The code that adds up the selections is:
Procedure DoAddUpAmounts
Number nAmount
Integer iRecNum
Get First_Selected_Item To iRecnum
Repeat
Move (Next_Selected_Item (Self, 1)) To iRecNum
showln "Recnum: " iRecnum
If (iRecNum > 0) Begin
Clear Activity
Move iRecnum to Activity.Recnum
Find eq Activity by recnum
If (Found) Add Activity.Fee1 to nAmount
If (Found) showln "Found: " iRecnum "fee: " activity.fee1 " Amount: "
nAmount
Else showln "Not found: " iRecnum
End
Until (iRecNum < 1)
Set Value of (Enrol_Amounts(Self)) item 0 to nAmount
End_Procedure
This may be a bug in dataflex. Has anyone got a multi-select dblist that
adds stuff up? Does it really work?
Peter Brooks
I am using a dblist
The dbList loads ok If I check any combination of rows then they are
selected ok. I test this by adding up some values from each row. However,
the problem is once the selection is made and it is unchecked the next time
you make a selection (from any row) that row is the only recognised
selection, even though the dbList may have 10 other selected rows. They
still remain highlighted.
I have stripped my dblist to bare bones - it started off with a selectable
checkbox.
The code that adds up the selections is:
Procedure DoAddUpAmounts
Number nAmount
Integer iRecNum
Get First_Selected_Item To iRecnum
Repeat
Move (Next_Selected_Item (Self, 1)) To iRecNum
showln "Recnum: " iRecnum
If (iRecNum > 0) Begin
Clear Activity
Move iRecnum to Activity.Recnum
Find eq Activity by recnum
If (Found) Add Activity.Fee1 to nAmount
If (Found) showln "Found: " iRecnum "fee: " activity.fee1 " Amount: "
nAmount
Else showln "Not found: " iRecnum
End
Until (iRecNum < 1)
Set Value of (Enrol_Amounts(Self)) item 0 to nAmount
End_Procedure
This may be a bug in dataflex. Has anyone got a multi-select dblist that
adds stuff up? Does it really work?
Peter Brooks