dark_mode EN
  • Method WTable :EditFromService
  • Parameters
    cService

    Name of the method in the WDoc where the code that will perform the edit operation is located

    oSource

    WButton or WLink type object that, when clicked, will trigger the action.

  • Return value

Automatically creates a WFetch object that allows editing the current row without leaving the current web page. The service should return a JSON indicating whether the editing operation is appropriate. For further information consult the programming guide.

Sample:

oBtn2:OnClick := ::oTable:EditFromService( "Srv_TableEdit", oBtn2 )
...
METHOD Srv_TableEdit( hParam ) CLASS WDocMain
  LOCAL hCargo := Engine:hCargo
  LOCAL cKey, cValue
  FOR EACH cKey, cValue IN HB_HKeys( hCargo ), HB_HValues( hCargo )
    HB_HSet( hCargo, cKey, Lower( cValue ) )
  NEXT
RETURN HB_JsonEncode( hCargo )

Previous chevron_left Next chevron_right