object CAdminListRow
  string $ID[,
  array $arRes = Array(), 
  mixed $link = false, 
  mixed $title = false]

The function adds new row to a table. The string is described by the CAdminListRow class instance. This method initialises new instance and returns its link.


Parameter Description
ID String unique ID.
arRes List of values as an "parameter"=>"value" array.
link Link, received as the default action for string.
title Text for string pop-up hint.


while($arRes = $rsData->NavNext(true, "f_")):
  // create a string. result: CAdminListRow class instance 
  $row =& $lAdmin->AddRow($f_ID, $arRes); 
  // then configure value display when viewing and editing a list
  // NAME parameter will be edited as text and displayed as a link
  $row->AddInputField("NAME", array("size"=>20));
  $row->AddViewField("NAME", '<a href="rubric_edit.php?ID='.$f_ID.'&lang='.LANG.'">'.$f_NAME.'</a>');
  // LID parameter will be edited as language selection dropdown list
  $row->AddEditField("LID", CLang::SelectBox("LID", $f_LID)); 
  // SORT parameter will be edited as text
  $row->AddInputField("SORT", array("size"=>20)); 
  // ACTIVE and VISIBLE flags will be edited as checkboxes
  // AUTO parameter will be displayed as "Yes" or "No", highlighted as semibold when editing
  $row->AddViewField("AUTO", $f_AUTO=="Y"?GetMessage("POST_U_YES"):GetMessage("POST_U_NO")); 
  $row->AddEditField("AUTO", "<b>".($f_AUTO=="Y"?GetMessage("POST_U_YES"):GetMessage("POST_U_NO"))."</b>");

  // generate context menu 
  $arActions = Array();

  // editing of element
  $arActions[] = array(
  // deleting of element
  if ($POST_RIGHT>="W")
    $arActions[] = array(
      "ACTION"=>"if(confirm('".GetMessage('rub_del_conf')."')) ".$lAdmin->ActionDoGroup($f_ID, "delete")

  // insert separator
  $arActions[] = array("SEPARATOR"=>true);

  // check template for auto-generated links
  if (strlen($f_TEMPLATE)>0 && $f_AUTO=="Y")
    $arActions[] = array(

  // if the last element - is separator, cleanup the junk.
  if(is_set($arActions[count($arActions)-1], "SEPARATOR"))
  // apply context menu to the string


© «Bitrix24», 2001-2022