Customize prompt lookup behavior in a dbgrid

From DataFlex Wiki
Revision as of 18:02, 12 February 2008 by 217.149.208.61 (talk) (New page: How can I set a column in a dbGrid to ignore the prompt under certain circumstances? 1. Via customizing the prompt method in the object Procedure Prompt Integer iColumn Boolean bOk...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

How can I set a column in a dbGrid to ignore the prompt under certain circumstances?

1. Via customizing the prompt method in the object

Procedure Prompt
  Integer iColumn
  Boolean bOk    
  move (true) to bOk
  Get Current_Col To iColumn
  If (iColumn=4) Begin
    // if in column 4 then check data
    Get Field_Current_Value Of Server_DD Field Foo.bar To sBar
    If (sBar="foo") Move (false) To bOk
  End
  If (bOk) Begin
    Forward Send Prompt
  End
Procedure // Prmopt

2. Via entry_display

 if(certain circumstances) begin
   Set Prompt_Button_Mode to pb_PromptOff
 end

and

 On_Key kPrompt Send myprompt
 Procedure Myprompt
   if(not((certain circumstances)) forward send prompt
 End_Procedure