本文整理汇总了PHP中TextEdit类的典型用法代码示例。如果您正苦于以下问题:PHP TextEdit类的具体用法?PHP TextEdit怎么用?PHP TextEdit使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TextEdit类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for ofa-numoff field
//
$editor = new TextEdit('ofa-numoff_edit');
$editColumn = new CustomEditColumn('Numero Offerta', 'ofa-numoff', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofa-codart field
//
$editor = new ComboBox('ofa-codart_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$lookupDataset = new TableDataset(new MyPDOConnectionFactory(), GetConnectionOptions(), '`articoli`');
$field = new IntegerField('id', null, null, true);
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, true);
$field = new StringField('art-codart');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('art-descart');
$lookupDataset->AddField($field, false);
$field = new StringField('art-dessup');
$lookupDataset->AddField($field, false);
$field = new StringField('art-codprod');
$lookupDataset->AddField($field, false);
$field = new StringField('art-codfam');
$lookupDataset->AddField($field, false);
$field = new StringField('unita_misura');
$lookupDataset->AddField($field, false);
$field = new StringField('art-gruppo-merc');
$lookupDataset->AddField($field, false);
$field = new StringField('art-categoria-omogenea');
$lookupDataset->AddField($field, false);
$field = new IntegerField('art-lungsmu');
$lookupDataset->AddField($field, false);
$field = new DateTimeField('datains');
$lookupDataset->AddField($field, false);
$field = new DateTimeField('datamod');
$lookupDataset->AddField($field, false);
$lookupDataset->setOrderByField('art-descart', GetOrderTypeAsSQL(otAscending));
$editColumn = new LookUpEditColumn('Codice articolo', 'ofa-codart', $editor, $this->dataset, 'art-codart', 'art-descart', $lookupDataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofa-descart field
//
$editor = new TextEdit('ofa-descart_edit');
$editor->SetSize(45);
$editor->SetMaxLength(45);
$editColumn = new CustomEditColumn('Ofa-descart', 'ofa-descart', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofa-lunghezza field
//
$editor = new TextEdit('ofa-lunghezza_edit');
$editColumn = new CustomEditColumn('Lunghezza', 'ofa-lunghezza', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofa-larghezza field
//
$editor = new TextEdit('ofa-larghezza_edit');
$editColumn = new CustomEditColumn('Ofa-larghezza', 'ofa-larghezza', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofa-spessore field
//
$editor = new TextEdit('ofa-spessore_edit');
$editColumn = new CustomEditColumn('Ofa-spessore', 'ofa-spessore', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofa-quantita field
//
$editor = new TextEdit('ofa-quantita_edit');
$editColumn = new CustomEditColumn('Ofa-quantita', 'ofa-quantita', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofa-przacq-net field
//
$editor = new TextEdit('ofa-przacq-net_edit');
$editColumn = new CustomEditColumn('Ofa-przacq-net', 'ofa-przacq-net', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofa-przacq-lor field
//
$editor = new TextEdit('ofa-przacq-lor_edit');
//.........这里部分代码省略.........
示例2: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for no_tipo_espacio field
//
$editor = new TextEdit('no_tipo_espacio_edit');
$editor->SetSize(100);
$editor->SetMaxLength(100);
$editColumn = new CustomEditColumn('No Tipo Espacio', 'no_tipo_espacio', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for id_tipo_espacio_padre field
//
$editor = new ComboBox('id_tipo_espacio_padre_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$lookupDataset = new TableDataset(
new PgConnectionFactory(),
GetConnectionOptions(),
'"public"."sga_tipo_espacio"');
$field = new IntegerField('id_tipo_espacio', null, null, true);
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, true);
$field = new StringField('no_tipo_espacio');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new IntegerField('id_tipo_espacio_padre');
$lookupDataset->AddField($field, false);
$field = new StringField('ds_referencia');
$lookupDataset->AddField($field, false);
$lookupDataset->setOrderByField('no_tipo_espacio', GetOrderTypeAsSQL(otAscending));
$editColumn = new LookUpEditColumn(
'Id Tipo Espacio Padre',
'id_tipo_espacio_padre',
$editor,
$this->dataset, 'id_tipo_espacio', 'no_tipo_espacio', $lookupDataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ds_referencia field
//
$editor = new TextAreaEdit('ds_referencia_edit', 50, 8);
$editColumn = new CustomEditColumn('Ds Referencia', 'ds_referencia', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
if ($this->GetSecurityInfo()->HasAddGrant())
{
$grid->SetShowAddButton(true);
$grid->SetShowInlineAddButton(false);
}
else
{
$grid->SetShowInlineAddButton(false);
$grid->SetShowAddButton(false);
}
}
示例3: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for USERNAME field
//
$editor = new TextEdit('username_edit');
$editor->SetSize(10);
$editor->SetMaxLength(10);
$editColumn = new CustomEditColumn('USERNAME', 'USERNAME', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ES_ADMIN field
//
$editor = new TextEdit('es_admin_edit');
$editor->SetSize(1);
$editor->SetMaxLength(1);
$editColumn = new CustomEditColumn('ES ADMIN', 'ES_ADMIN', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for NACIMIENTO field
//
$editor = new DateTimeEdit('nacimiento_edit', false, 'Y-m-d H:i:s', GetFirstDayOfWeek());
$editColumn = new CustomEditColumn('NACIMIENTO', 'NACIMIENTO', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for PRIMER_APELLIDO field
//
$editor = new TextEdit('primer_apellido_edit');
$editor->SetSize(30);
$editor->SetMaxLength(30);
$editColumn = new CustomEditColumn('PRIMER APELLIDO', 'PRIMER_APELLIDO', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for SEGUNDO_APELLIDO field
//
$editor = new TextEdit('segundo_apellido_edit');
$editor->SetSize(50);
$editor->SetMaxLength(50);
$editColumn = new CustomEditColumn('SEGUNDO APELLIDO', 'SEGUNDO_APELLIDO', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for NOMBRE field
//
$editor = new TextEdit('nombre_edit');
$editor->SetSize(40);
$editor->SetMaxLength(40);
$editColumn = new CustomEditColumn('NOMBRE', 'NOMBRE', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for GENERO_ID field
//
$editor = new ComboBox('genero_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$lookupDataset = new TableDataset(new OracleConnectionFactory(), GetConnectionOptions(), '"GE"."GENERO"');
$field = new IntegerField('GENERO_ID');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, true);
$field = new StringField('NOMBRE');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new DateField('FEC_CREACION');
$lookupDataset->AddField($field, false);
$field = new StringField('USUARIO_CREACION');
$lookupDataset->AddField($field, false);
$field = new DateField('FEC_ULTIMA_MOD');
$lookupDataset->AddField($field, false);
$field = new StringField('USUARIO_ULTIMA_MOD');
$lookupDataset->AddField($field, false);
$lookupDataset->SetOrderBy('NOMBRE', GetOrderTypeAsSQL(otAscending));
$editColumn = new LookUpEditColumn('GENERO ID', 'GENERO_ID', $editor, $this->dataset, 'GENERO_ID', 'NOMBRE', $lookupDataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for CIUDAD_ID field
//
$editor = new ComboBox('ciudad_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$lookupDataset = new TableDataset(new OracleConnectionFactory(), GetConnectionOptions(), '"GE"."CIUDAD"');
$field = new IntegerField('CIUDAD_ID');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, true);
$field = new StringField('NOMBRE');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new IntegerField('PAIS_ID');
$lookupDataset->AddField($field, false);
//.........这里部分代码省略.........
示例4: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for ofv-numoff field
//
$editor = new TextEdit('ofv-numoff_edit');
$editColumn = new CustomEditColumn('Ofv-numoff', 'ofv-numoff', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofv-codvoce field
//
$editor = new TextEdit('ofv-codvoce_edit');
$editColumn = new CustomEditColumn('Ofv-codvoce', 'ofv-codvoce', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofv-quantita field
//
$editor = new TextEdit('ofv-quantita_edit');
$editColumn = new CustomEditColumn('Ofv-quantita', 'ofv-quantita', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofv-lunghezza field
//
$editor = new TextEdit('ofv-lunghezza_edit');
$editColumn = new CustomEditColumn('Ofv-lunghezza', 'ofv-lunghezza', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofv-larghezza field
//
$editor = new TextEdit('ofv-larghezza_edit');
$editColumn = new CustomEditColumn('Ofv-larghezza', 'ofv-larghezza', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofv-tiposmu field
//
$editor = new TextEdit('ofv-tiposmu_edit');
$editor->SetSize(1);
$editor->SetMaxLength(1);
$editColumn = new CustomEditColumn('Ofv-tiposmu', 'ofv-tiposmu', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofv-przacq field
//
$editor = new TextEdit('ofv-przacq_edit');
$editColumn = new CustomEditColumn('Ofv-przacq', 'ofv-przacq', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofv-sconto field
//
$editor = new TextEdit('ofv-sconto_edit');
$editColumn = new CustomEditColumn('Ofv-sconto', 'ofv-sconto', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofv-valuni-cal field
//
$editor = new TextEdit('ofv-valuni-cal_edit');
$editColumn = new CustomEditColumn('Ofv-valuni-cal', 'ofv-valuni-cal', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ofv-valuni-fin field
//
$editor = new TextEdit('ofv-valuni-fin_edit');
$editColumn = new CustomEditColumn('Ofv-valuni-fin', 'ofv-valuni-fin', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for datains field
//
$editor = new DateTimeEdit('datains_edit', true, 'Y-m-d H:i:s', GetFirstDayOfWeek());
$editColumn = new CustomEditColumn('Datains', 'datains', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for datamod field
//
$editor = new DateTimeEdit('datamod_edit', true, 'Y-m-d H:i:s', GetFirstDayOfWeek());
$editColumn = new CustomEditColumn('Datamod', 'datamod', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$editColumn->SetAllowSetToDefault(true);
$this->ApplyCommonColumnEditProperties($editColumn);
//.........这里部分代码省略.........
示例5: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for project_name field
//
$editor = new TextEdit('project_name_edit');
$editColumn = new CustomEditColumn('Project Name', 'project_name', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for approved_budget field
//
$editor = new TextEdit('approved_budget_edit');
$editColumn = new CustomEditColumn('Approved Budget', 'approved_budget', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$validator = new NumberValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('NumberValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for lead field
//
$editor = new TextEdit('lead_edit');
$editColumn = new CustomEditColumn('Lead', 'lead', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
if ($this->GetSecurityInfo()->HasAddGrant()) {
$grid->SetShowAddButton(false);
$grid->SetShowInlineAddButton(false);
} else {
$grid->SetShowInlineAddButton(false);
$grid->SetShowAddButton(false);
}
}
示例6: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for first_name field
//
$editor = new TextEdit('first_name_edit');
$editor->SetSize(25);
$editor->SetMaxLength(25);
$editColumn = new CustomEditColumn('First Name', 'first_name', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for middle_name field
//
$editor = new TextEdit('middle_name_edit');
$editor->SetSize(25);
$editor->SetMaxLength(25);
$editColumn = new CustomEditColumn('Middle Name', 'middle_name', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for last_name field
//
$editor = new TextEdit('last_name_edit');
$editor->SetSize(25);
$editor->SetMaxLength(25);
$editColumn = new CustomEditColumn('Last Name', 'last_name', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for party_affiliation field
//
$editor = new TextEdit('party_affiliation_edit');
$editor->SetSize(1);
$editor->SetMaxLength(1);
$editColumn = new CustomEditColumn('Party Affiliation', 'party_affiliation', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for address1 field
//
$editor = new TextEdit('address1_edit');
$editor->SetSize(25);
$editor->SetMaxLength(25);
$editColumn = new CustomEditColumn('Address1', 'address1', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for address2 field
//
$editor = new TextEdit('address2_edit');
$editor->SetSize(25);
$editor->SetMaxLength(25);
$editColumn = new CustomEditColumn('Address2', 'address2', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for city field
//
$editor = new TextEdit('city_edit');
$editor->SetSize(25);
$editor->SetMaxLength(25);
$editColumn = new CustomEditColumn('City', 'city', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for state field
//
$editor = new TextEdit('state_edit');
$editor->SetSize(2);
$editor->SetMaxLength(2);
$editColumn = new CustomEditColumn('State', 'state', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for zip field
//
$editor = new TextEdit('zip_edit');
$editor->SetSize(5);
$editor->SetMaxLength(5);
$editColumn = new CustomEditColumn('Zip', 'zip', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for phone field
//
$editor = new TextEdit('phone_edit');
$editor->SetSize(15);
$editor->SetMaxLength(15);
//.........这里部分代码省略.........
示例7: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for ESTADO_CIVIL_ID field
//
$editor = new TextEdit('estado_civil_id_edit');
$editColumn = new CustomEditColumn('ESTADO CIVIL ID', 'ESTADO_CIVIL_ID', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for NOMBRE field
//
$editor = new TextEdit('nombre_edit');
$editor->SetSize(20);
$editor->SetMaxLength(20);
$editColumn = new CustomEditColumn('NOMBRE', 'NOMBRE', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
if ($this->GetSecurityInfo()->HasAddGrant()) {
$grid->SetShowAddButton(true);
$grid->SetShowInlineAddButton(false);
} else {
$grid->SetShowInlineAddButton(false);
$grid->SetShowAddButton(false);
}
}
示例8: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for rpt_id field
//
$editor = new TextEdit('rpt_id_edit');
$editColumn = new CustomEditColumn('Rpt Id', 'rpt_id', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for rpt_name field
//
$editor = new TextEdit('rpt_name_edit');
$editor->SetSize(100);
$editor->SetMaxLength(100);
$editColumn = new CustomEditColumn('Rpt Name', 'rpt_name', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for rpt_title field
//
$editor = new TextAreaEdit('rpt_title_edit', 50, 8);
$editColumn = new CustomEditColumn('Rpt Title', 'rpt_title', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for rpt_cdate field
//
$editor = new DateTimeEdit('rpt_cdate_edit', false, 'Y-m-d H:i:s', GetFirstDayOfWeek());
$editColumn = new CustomEditColumn('Rpt Cdate', 'rpt_cdate', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for rpt_mdate field
//
$editor = new DateTimeEdit('rpt_mdate_edit', false, 'Y-m-d H:i:s', GetFirstDayOfWeek());
$editColumn = new CustomEditColumn('Rpt Mdate', 'rpt_mdate', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for rpt_content field
//
$editor = new ImageUploader('rpt_content_edit');
$editor->SetShowImage(false);
$editColumn = new FileUploadingColumn('Rpt Content', 'rpt_content', $editor, $this->dataset, false, false, 'GE_webreportsGrid_rpt_content_handler_insert');
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for rpt_owner field
//
$editor = new TextEdit('rpt_owner_edit');
$editor->SetSize(100);
$editor->SetMaxLength(100);
$editColumn = new CustomEditColumn('Rpt Owner', 'rpt_owner', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for rpt_status field
//
$editor = new TextEdit('rpt_status_edit');
$editor->SetSize(10);
$editor->SetMaxLength(10);
$editColumn = new CustomEditColumn('Rpt Status', 'rpt_status', $editor, $this->dataset);
$editColumn->SetAllowSetToDefault(true);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for rpt_type field
//
$editor = new TextEdit('rpt_type_edit');
$editor->SetSize(10);
$editor->SetMaxLength(10);
$editColumn = new CustomEditColumn('Rpt Type', 'rpt_type', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
if ($this->GetSecurityInfo()->HasAddGrant()) {
$grid->SetShowAddButton(true);
$grid->SetShowInlineAddButton(false);
} else {
$grid->SetShowInlineAddButton(false);
$grid->SetShowAddButton(false);
}
}
示例9: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for project_name field
//
$editor = new TextEdit('project_name_edit');
$editColumn = new CustomEditColumn('Project Name', 'project_name', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for date_start field
//
$editor = new TextEdit('date_start_edit');
$editColumn = new CustomEditColumn('Date Start', 'date_start', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for date_end field
//
$editor = new TextEdit('date_end_edit');
$editColumn = new CustomEditColumn('Date End', 'date_end', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
if ($this->GetSecurityInfo()->HasAddGrant()) {
$grid->SetShowAddButton(false);
$grid->SetShowInlineAddButton(false);
} else {
$grid->SetShowInlineAddButton(false);
$grid->SetShowAddButton(false);
}
}
示例10: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for idPUC field
//
$editor = new TextEdit('idpuc_edit');
$editor->SetSize(45);
$editor->SetMaxLength(45);
$editColumn = new CustomEditColumn('IdPUC', 'idPUC', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for Nombre field
//
$editor = new TextEdit('nombre_edit');
$editor->SetSize(45);
$editor->SetMaxLength(45);
$editColumn = new CustomEditColumn('Nombre', 'Nombre', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for Valor field
//
$editor = new TextEdit('valor_edit');
$editor->SetSize(45);
$editor->SetMaxLength(45);
$editColumn = new CustomEditColumn('Valor', 'Valor', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for GupoCuentas_PUC field
//
$editor = new TextEdit('gupocuentas_puc_edit');
$editor->SetSize(45);
$editor->SetMaxLength(45);
$editColumn = new CustomEditColumn('GupoCuentas PUC', 'GupoCuentas_PUC', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
if ($this->GetSecurityInfo()->HasAddGrant()) {
$grid->SetShowAddButton(true);
$grid->SetShowInlineAddButton(false);
} else {
$grid->SetShowInlineAddButton(false);
$grid->SetShowAddButton(false);
}
}
示例11: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for idFacturas field
//
$editor = new TextEdit('idfacturas_edit');
$editColumn = new CustomEditColumn('IdFacturas', 'idFacturas', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for Fecha field
//
$editor = new TextEdit('fecha_edit');
$editor->SetSize(20);
$editor->SetMaxLength(20);
$editColumn = new CustomEditColumn('Fecha', 'Fecha', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for OCompra field
//
$editor = new TextEdit('ocompra_edit');
$editor->SetSize(45);
$editor->SetMaxLength(45);
$editColumn = new CustomEditColumn('OCompra', 'OCompra', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for OSalida field
//
$editor = new TextEdit('osalida_edit');
$editor->SetSize(45);
$editor->SetMaxLength(45);
$editColumn = new CustomEditColumn('OSalida', 'OSalida', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for FormaPago field
//
$editor = new TextEdit('formapago_edit');
$editor->SetSize(20);
$editor->SetMaxLength(20);
$editColumn = new CustomEditColumn('FormaPago', 'FormaPago', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for Subtotal field
//
$editor = new TextEdit('subtotal_edit');
$editor->SetSize(45);
$editor->SetMaxLength(45);
$editColumn = new CustomEditColumn('Subtotal', 'Subtotal', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for IVA field
//
$editor = new TextEdit('iva_edit');
$editor->SetSize(45);
$editor->SetMaxLength(45);
$editColumn = new CustomEditColumn('IVA', 'IVA', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for Descuentos field
//
$editor = new TextEdit('descuentos_edit');
$editor->SetSize(45);
$editor->SetMaxLength(45);
$editColumn = new CustomEditColumn('Descuentos', 'Descuentos', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for Total field
//
$editor = new TextEdit('total_edit');
$editor->SetSize(45);
$editor->SetMaxLength(45);
$editColumn = new CustomEditColumn('Total', 'Total', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for SaldoFact field
//
$editor = new TextEdit('saldofact_edit');
$editor->SetSize(45);
$editor->SetMaxLength(45);
//.........这里部分代码省略.........
示例12: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for task_name field
//
$editor = new TextEdit('task_name_edit');
$editor->SetSize(100);
$editor->SetMaxLength(100);
$editColumn = new CustomEditColumn('Task Name', 'task_name', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for priority_name field
//
$editor = new TextEdit('priority_name_edit');
$editor->SetSize(50);
$editor->SetMaxLength(50);
$editColumn = new CustomEditColumn('Priority Name', 'priority_name', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for public_engagement field
//
$editor = new TextEdit('public_engagement_edit');
$editor->SetSize(100);
$editor->SetMaxLength(100);
$editColumn = new CustomEditColumn('Public Engagement', 'public_engagement', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for level_of_service field
//
$editor = new TextEdit('level_of_service_edit');
$editor->SetSize(100);
$editor->SetMaxLength(100);
$editColumn = new CustomEditColumn('Level Of Service', 'level_of_service', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for project_type field
//
$editor = new TextEdit('project_type_edit');
$editor->SetSize(100);
$editor->SetMaxLength(100);
$editColumn = new CustomEditColumn('Project Type', 'project_type', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
if ($this->GetSecurityInfo()->HasAddGrant()) {
$grid->SetShowAddButton(true);
$grid->SetShowInlineAddButton(false);
} else {
$grid->SetShowInlineAddButton(false);
$grid->SetShowAddButton(false);
}
}
示例13: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for programm_id field
//
$editor = new ComboBox('programm_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$editColumn = new CustomEditColumn('Project Type', 'programm_id', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for project_name field
//
$editor = new TextEdit('project_name_edit');
$editColumn = new CustomEditColumn('Project Name', 'project_name', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$validator = new CustomRegExpValidator('^[A-Za-z0-9 ()&]+[-]*[A-Za-z0-9 ()&]*$', StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RegExpValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for date_start field
//
$editor = new DateTimeEdit('date_start_edit', false, 'Y-m-d', GetFirstDayOfWeek());
$editColumn = new CustomEditColumn('Date Start', 'date_start', $editor, $this->dataset);
$editColumn->SetInsertDefaultValue($this->RenderText('%CURRENT_DATE%'));
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for date_end field
//
$editor = new DateTimeEdit('date_end_edit', true, 'Y-m-d', GetFirstDayOfWeek());
$editColumn = new CustomEditColumn('Date End', 'date_end', $editor, $this->dataset);
$editColumn->SetInsertDefaultValue($this->RenderText('%CURRENT_DATE%'));
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for year field
//
$editor = new TextEdit('year_edit');
$editColumn = new CustomEditColumn('Year', 'year', $editor, $this->dataset);
$editColumn->SetInsertDefaultValue($this->RenderText('2016'));
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$validator = new NumberValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('NumberValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for notes field
//
$editor = new TextAreaEdit('notes_edit', 50, 8);
$editColumn = new CustomEditColumn('Objectives', 'notes', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for priority field
//
$editor = new ComboBox('priority_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$editColumn = new CustomEditColumn('Priority', 'priority', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for lead field
//
$editor = new ComboBox('lead_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$editColumn = new CustomEditColumn('Project Lead', 'lead', $editor, $this->dataset);
$editColumn->SetInsertDefaultValue($this->RenderText('%CURRENT_USER_ID%'));
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for approved_budget field
//
$editor = new TextEdit('approved_budget_edit');
$editor->SetPlaceholder($this->RenderText('currency value without comma'));
$editor->SetPrefix($this->RenderText('$'));
$editor->SetSuffix($this->RenderText('.00'));
$editColumn = new CustomEditColumn('Approved Budget', 'approved_budget', $editor, $this->dataset);
$editColumn->SetInsertDefaultValue($this->RenderText('0'));
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$validator = new NumberValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('NumberValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for budget_spent field
//
$editor = new TextEdit('budget_spent_edit');
//.........这里部分代码省略.........
示例14: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for DEPARTMENT field
//
$editor = new TextEdit('department_edit');
$editor->SetSize(20);
$editor->SetMaxLength(20);
$editColumn = new CustomEditColumn('Department', 'DEPARTMENT', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for LOCATION field
//
$editor = new TextEdit('location_edit');
$editor->SetSize(20);
$editor->SetMaxLength(20);
$editColumn = new CustomEditColumn('Location', 'LOCATION', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for PHONE_NO field
//
$editor = new TextEdit('phone_no_edit');
$editor->SetSize(20);
$editor->SetMaxLength(20);
$editColumn = new CustomEditColumn('Phone No', 'PHONE_NO', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
if ($this->GetSecurityInfo()->HasAddGrant()) {
$grid->SetShowAddButton(true);
$grid->SetShowInlineAddButton(false);
} else {
$grid->SetShowInlineAddButton(false);
$grid->SetShowAddButton(false);
}
}
示例15: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for EVENTO_ID field
//
$editor = new TextEdit('evento_id_edit');
$editColumn = new CustomEditColumn('EVENTO ID', 'EVENTO_ID', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for NOMBRE field
//
$editor = new TextEdit('nombre_edit');
$editor->SetSize(30);
$editor->SetMaxLength(30);
$editColumn = new CustomEditColumn('NOMBRE', 'NOMBRE', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for FECHA_HORA field
//
$editor = new DateTimeEdit('fecha_hora_edit', false, 'Y-m-d H:i:s', GetFirstDayOfWeek());
$editColumn = new CustomEditColumn('FECHA HORA', 'FECHA_HORA', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for LUGAR field
//
$editor = new TextEdit('lugar_edit');
$editor->SetSize(30);
$editor->SetMaxLength(30);
$editColumn = new CustomEditColumn('LUGAR', 'LUGAR', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for DESCRIPCION field
//
$editor = new TextAreaEdit('descripcion_edit', 50, 8);
$editColumn = new CustomEditColumn('DESCRIPCION', 'DESCRIPCION', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for CIUDAD field
//
$editor = new ComboBox('ciudad_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$lookupDataset = new TableDataset(new OracleConnectionFactory(), GetConnectionOptions(), '"GE"."CIUDAD"');
$field = new IntegerField('CIUDAD_ID');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, true);
$field = new StringField('NOMBRE');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new IntegerField('PAIS_ID');
$lookupDataset->AddField($field, false);
$field = new DateField('FEC_CREACION');
$lookupDataset->AddField($field, false);
$field = new StringField('USUARIO_CREACION');
$lookupDataset->AddField($field, false);
$field = new DateField('FEC_ULTIMA_MOD');
$lookupDataset->AddField($field, false);
$field = new StringField('USUARIO_ULTIMA_MOD');
$lookupDataset->AddField($field, false);
$lookupDataset->SetOrderBy('NOMBRE', GetOrderTypeAsSQL(otAscending));
$editColumn = new LookUpEditColumn('CIUDAD', 'CIUDAD', $editor, $this->dataset, 'CIUDAD_ID', 'NOMBRE', $lookupDataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
if ($this->GetSecurityInfo()->HasAddGrant()) {
$grid->SetShowAddButton(true);
$grid->SetShowInlineAddButton(false);
} else {
$grid->SetShowInlineAddButton(false);
$grid->SetShowAddButton(false);
}
}