This code seems to work:
In the CJGrid outside the columns according to https://support.dataaccess.com/Forum...t=PromptUpdate
Code:
Procedure PromptUpdate Handle hoPrompt //Necessary according to link above from Ivan Schoof
Handle hoCol
Get SelectedColumnObject to hoCol
If (hoCol) Begin
Send PromptUpdate of hoCol hoPrompt
End
End_Procedure
In the CJGridColumn
Code:
Procedure PromptUpdate Handle hoPrompt
String[] SelectedNames
//Values from 2 selectionlist columns are transferred to the grid
Get SelectedColumnValues of hoPrompt 0 to SelectedNames
If (SizeOfArray(SelectedNames)) Begin
Send UpdateCurrentValue of oCJGridColumn2 SelectedNames[0]
End
Get SelectedColumnValues of hoPrompt 2 to SelectedNames
If (SizeOfArray(SelectedNames)) Begin
Send UpdateCurrentValue of oCJGridColumn4 SelectedNames[0]
End
// I would think this code should work, but it doesn't
// Get SelectedColumnValues of hoPrompt 0 to SelectedNames[0]
// Get SelectedColumnValues of hoPrompt 0 to SelectedNames[1]
// If (SizeOfArray(SelectedNames)) Begin
// Send UpdateCurrentValue of oCJGridColumn2 SelectedNames[0]
// Send UpdateCurrentValue of oCJGridColumn4 SelectedNames[1]
// End
End_Procedure
Procedure Prompt_Callback Handle hoPrompt
String sMinkod sSvekod sKod
Get SelectedRowValue of oCJGridColumn1 to sMinKod
Get SelectedRowValue of oCJGridColumn2 to sSveKod
If (sSvekod='') Move sMinkod to sKod
Else Move sSvekod to sKod
Set peUpdateMode of hoPrompt to umPromptCustom
Set piUpdateColumn of hoPrompt to 0
Set piInitialColumn of hoPrompt to 0
Set phmPromptUpdateCallback of hoPrompt to (RefProc(PromptUpdate))
Set pbAutoSeed of hoPrompt to True
Set psSeedValue of hoPrompt to sKod
// Forward Send Prompt_Callback hoPrompt
End_Procedure
/Bengt