Documentation

ActionDoGroup

string
CAdminList::ActionDoGroup(
  string $ID, 
  string $action_id[, 
  string $add_params='']
)

ActionDoGroup returns a string which is a JavaScript call required to update a list dynamically using the specified URL. The update script can use the [link= 506982]CAdminList:CheckListMode[/link] method to check the action type.

Parameters

Parameter Description
ID The list ID.
action_id The ID of the required action.
add_params The string containing additional parameters for the GET query.

Example

  // create a row; the result is the CAdminListRow class instance
  $row =& $lAdmin->AddRow($f_ID, $arRes); 
  
  // build the context menu
  $arActions = Array();

  // delete the element
  if ($POST_RIGHT>="W")
    $arActions[] = array(
      "ICON"=>"delete",
      "TEXT"=>GetMessage("rub_del"),
      "ACTION"=>"if(confirm('".GetMessage('rub_del_conf')."')) ".$lAdmin->ActionDoGroup($f_ID, "delete")
    );
// attach the context menu to the row $row->AddActions($arActions);
© «Bitrix24», 2001-2024