AskRecord (edit-in-place selected browse item)

Top  Previous  Next


AskRecord( request ), VIRTUAL, PROC


Does edit-in-place update of the selected browse record.


A numeric constant, variable, EQUATE, or expression that indicates the requested edit-in-place action. Valid edit-in-place actions are Insert, Change, and Delete.

The AskRecord method does edit-in-place updates for the selected browse row and column, then returns a value indicating whether the requested edit was completed or cancelled.

The AddEditControl method specifies a custom EditClass for a specific browse column.


The AskRecord method assumes the UpdateViewRecord method has been called to ensure correct record buffer contents.

AskRecord should be followed by the ResetFromAsk method.

The Ask method calls the AskRecord method.

Return value EQUATEs are declared in \LIBSRC\ABFILE.EQU:

RequestCompleted   EQUATE (1)     !Update Completed

RequestCancelled   EQUATE (2)     !Update Aborted

EQUATEs for request are declared in \LIBSRC\ABFILE.EQU:

InsertRecord     EQUATE (1)     !Add a record to table

ChangeRecord     EQUATE (2)     !Change the current record

DeleteRecord     EQUATE (3)     !Delete the current record

Return Data Type:     BYTE


BrowseClass.Ask PROCEDURE(BYTE Req)

Response BYTE



   SELF.Window.VCRRequest = VCR:None

   IF KEYCODE() = MouseRightUp



   IF SELF.AskProcedure

     IF Req=InsertRecord THEN

       IF SELF.PrimeRecord()

         RETURN RequestCancelled



     Response = SELF.Window.Run(SELF.AskProcedure,Req)



     Response = SELF.AskRecord(Req)


 UNTIL SELF.Window.VCRRequest = VCR:None

 RETURN Response

See Also:     AddEditControl, Ask, ResetFromAsk