예제 #1
0
 public function RemoveAssetModelsColumn_Render(AssetCustomFieldAssetModel $objAssetCustomFieldAssetModel)
 {
     $strControlId = 'btnAssetModelRemove' . $objAssetCustomFieldAssetModel->AssetModelId;
     $btnAssetModelRemove = new QButton($this->dtgAssetModels);
     $btnAssetModelRemove->Text = 'Remove';
     $btnAssetModelRemove->ActionParameter = $objAssetCustomFieldAssetModel->AssetModelId;
     $btnAssetModelRemove->AddAction(new QClickEvent(), new QAjaxAction('btnAssetModelRemove_Click'));
     $btnAssetModelRemove->AddAction(new QEnterKeyEvent(), new QAjaxAction('btnAssetModelRemove_Click'));
     $btnAssetModelRemove->AddAction(new QEnterKeyEvent(), new QTerminateAction());
     $btnAssetModelRemove->CausesValidation = false;
     return $btnAssetModelRemove->RenderWithError(false);
 }
예제 #2
0
 public function RemoveColumn_Render(CustomFieldValue $objCustomFieldValue)
 {
     $strControlId = 'btnRemove' . $objCustomFieldValue->CustomFieldValueId;
     $btnRemove = $this->GetControl($strControlId);
     if (!$btnRemove) {
         // Create the Remove button for this row in the DataGrid
         // Use ActionParameter to specify the ID of the asset
         $btnRemove = new QButton($this->dtgValue, $strControlId);
         $btnRemove->Text = 'Remove';
         $btnRemove->ActionParameter = $objCustomFieldValue->CustomFieldValueId;
         $btnRemove->AddAction(new QClickEvent(), new QAjaxAction('btnRemove_Click'));
         $btnRemove->AddAction(new QEnterKeyEvent(), new QAjaxAction('btnRemove_Click'));
         $btnRemove->AddAction(new QEnterKeyEvent(), new QTerminateAction());
         $btnRemove->CausesValidation = false;
     }
     return $btnRemove->RenderWithError(false);
 }