当前位置: 首页>>代码示例>>PHP>>正文


PHP CustomEditColumn::setVisible方法代码示例

本文整理汇总了PHP中CustomEditColumn::setVisible方法的典型用法代码示例。如果您正苦于以下问题:PHP CustomEditColumn::setVisible方法的具体用法?PHP CustomEditColumn::setVisible怎么用?PHP CustomEditColumn::setVisible使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CustomEditColumn的用法示例。


在下文中一共展示了CustomEditColumn::setVisible方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: AddFieldColumns

 protected function AddFieldColumns(Grid $grid)
 {
     //
     // View column for name field
     //
     $column = new TextViewColumn('name', 'Name', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for name field
     //
     $editor = new TextEdit('name_edit');
     $editColumn = new CustomEditColumn('Name', 'name', $editor, $this->dataset);
     $editColumn->setVisible(false);
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for name field
     //
     $editor = new TextEdit('name_edit');
     $editColumn = new CustomEditColumn('Name', 'name', $editor, $this->dataset);
     $editColumn->setVisible(false);
     $editColumn->SetInsertDefaultValue($this->RenderText('%CURRENT_USER_NAME%'));
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for date field
     //
     $column = new DateTimeViewColumn('date', 'Date', $this->dataset);
     $column->SetDateTimeFormat('Y-m-d');
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for date field
     //
     $editor = new DateTimeEdit('date_edit', false, 'Y-m-d H:i:s', GetFirstDayOfWeek());
     $editColumn = new CustomEditColumn('Date', 'date', $editor, $this->dataset);
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for date field
     //
     $editor = new DateTimeEdit('date_edit', false, 'Y-m-d H:i:s', GetFirstDayOfWeek());
     $editColumn = new CustomEditColumn('Date', 'date', $editor, $this->dataset);
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $column->SetDescription($this->RenderText(''));
     $column->SetFixedWidth(null);
     $grid->AddViewColumn($column);
     //
     // View column for Task field
     //
     $column = new TextViewColumn('task_id_Task', 'Project & Task', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for task_id field
     //
     $editor = new ComboBox('task_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`taskview`');
     $field = new IntegerField('task_id');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('project_id');
     $lookupDataset->AddField($field, false);
     $field = new StringField('assigned_to');
     $lookupDataset->AddField($field, false);
     $field = new DateField('date_start');
     $lookupDataset->AddField($field, false);
     $field = new DateField('date_end');
     $lookupDataset->AddField($field, false);
     $field = new StringField('task_name');
     $lookupDataset->AddField($field, false);
     $field = new StringField('notes');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('hrs');
     $lookupDataset->AddField($field, false);
     $field = new StringField('wo');
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('staff_id');
     $lookupDataset->AddField($field, false);
     $field = new StringField('Task');
//.........这里部分代码省略.........
开发者ID:BCDevExchange,项目名称:WORKPLAN,代码行数:101,代码来源:multiple_time_entry.php


注:本文中的CustomEditColumn::setVisible方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。