本文整理汇总了PHP中Grid::SetAllowDeleteSelected方法的典型用法代码示例。如果您正苦于以下问题:PHP Grid::SetAllowDeleteSelected方法的具体用法?PHP Grid::SetAllowDeleteSelected怎么用?PHP Grid::SetAllowDeleteSelected使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Grid
的用法示例。
在下文中一共展示了Grid::SetAllowDeleteSelected方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CreateGrid
protected function CreateGrid()
{
$result = new Grid($this, $this->dataset, 'listino_articoliGrid');
if ($this->GetSecurityInfo()->HasDeleteGrant()) {
$result->SetAllowDeleteSelected(false);
} else {
$result->SetAllowDeleteSelected(false);
}
ApplyCommonPageSettings($this, $result);
$result->SetUseImagesForActions(true);
$result->SetUseFixedHeader(false);
$result->SetShowLineNumbers(true);
$result->SetAllowOrdering(false);
$result->SetHighlightRowAtHover(false);
$result->SetWidth('');
$result->BeforeUpdateRecord->AddListener('listino_articoliGrid' . '_' . 'BeforeUpdateRecord', $this);
$result->BeforeInsertRecord->AddListener('listino_articoliGrid' . '_' . 'BeforeInsertRecord', $this);
$this->CreateGridSearchControl($result);
$this->CreateGridAdvancedSearchControl($result);
$this->AddFieldColumns($result);
$this->AddSingleRecordViewColumns($result);
$this->AddEditColumns($result);
$this->AddInsertColumns($result);
$this->AddPrintColumns($result);
$this->AddExportColumns($result);
$this->AddOperationsColumns($result);
$this->SetShowPageList(true);
$this->SetHidePageListByDefault(false);
$this->SetExportToExcelAvailable(false);
$this->SetExportToWordAvailable(false);
$this->SetExportToXmlAvailable(false);
$this->SetExportToCsvAvailable(false);
$this->SetExportToPdfAvailable(false);
$this->SetPrinterFriendlyAvailable(false);
$this->SetSimpleSearchAvailable(false);
$this->SetAdvancedSearchAvailable(false);
$this->SetFilterRowAvailable(true);
$this->SetVisualEffectsEnabled(true);
$this->SetShowTopPageNavigator(true);
$this->SetShowBottomPageNavigator(false);
//
// Http Handlers
//
//
// View column for lisdesc field
//
$column = new TextViewColumn('lisdesc', 'Descrizione', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'listino_articoliGrid_lisdesc_handler_list', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for lisdesc field
//
$column = new TextViewColumn('lisdesc', 'Descrizione', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'listino_articoliGrid_lisdesc_handler_view', $column);
GetApplication()->RegisterHTTPHandler($handler);
$lookupDataset = new TableDataset(new MyPDOConnectionFactory(), GetConnectionOptions(), '`elenco_articoli_view`');
$field = new StringField('art-codart');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('descrizione');
$lookupDataset->AddField($field, false);
$lookupDataset->setOrderByField('descrizione', GetOrderTypeAsSQL(otAscending));
$lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), ''));
$handler = new DynamicSearchHandler($lookupDataset, $this, 'edit_lis-codart_descrizione_search', 'art-codart', 'descrizione', null);
GetApplication()->RegisterHTTPHandler($handler);
$lookupDataset = new TableDataset(new MyPDOConnectionFactory(), GetConnectionOptions(), '`elenco_articoli_view`');
$field = new StringField('art-codart');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('descrizione');
$lookupDataset->AddField($field, false);
$lookupDataset->setOrderByField('descrizione', GetOrderTypeAsSQL(otAscending));
$lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), ''));
$handler = new DynamicSearchHandler($lookupDataset, $this, 'insert_lis-codart_descrizione_search', 'art-codart', 'descrizione', null);
GetApplication()->RegisterHTTPHandler($handler);
return $result;
}
示例2: CreateGrid
protected function CreateGrid()
{
$result = new Grid($this, $this->dataset, 'offerteGrid');
if ($this->GetSecurityInfo()->HasDeleteGrant()) {
$result->SetAllowDeleteSelected(false);
} else {
$result->SetAllowDeleteSelected(false);
}
ApplyCommonPageSettings($this, $result);
$result->SetUseImagesForActions(true);
$result->SetUseFixedHeader(false);
$result->SetShowLineNumbers(true);
$result->SetAllowOrdering(false);
$result->SetHighlightRowAtHover(false);
$result->SetWidth('');
$result->BeforeUpdateRecord->AddListener('offerteGrid' . '_' . 'BeforeUpdateRecord', $this);
$result->BeforeInsertRecord->AddListener('offerteGrid' . '_' . 'BeforeInsertRecord', $this);
$this->CreateGridSearchControl($result);
$this->CreateGridAdvancedSearchControl($result);
$this->AddFieldColumns($result);
$this->AddSingleRecordViewColumns($result);
$this->AddEditColumns($result);
$this->AddInsertColumns($result);
$this->AddPrintColumns($result);
$this->AddExportColumns($result);
$this->AddOperationsColumns($result);
$this->SetShowPageList(true);
$this->SetHidePageListByDefault(false);
$this->SetExportToExcelAvailable(false);
$this->SetExportToWordAvailable(false);
$this->SetExportToXmlAvailable(false);
$this->SetExportToCsvAvailable(false);
$this->SetExportToPdfAvailable(false);
$this->SetPrinterFriendlyAvailable(false);
$this->SetSimpleSearchAvailable(false);
$this->SetAdvancedSearchAvailable(false);
$this->SetFilterRowAvailable(false);
$this->SetVisualEffectsEnabled(true);
$this->SetShowTopPageNavigator(false);
$this->SetShowBottomPageNavigator(false);
//
// Http Handlers
//
$pageView = new offerte_dettaglio_articoliDetailView0offertePage($this, 'Offerte Dettaglio Articoli', 'Offerte Dettaglio Articoli', array('ofa-offid'), GetCurrentUserGrantForDataSource('offerte.offerte_dettaglio_articoli'), 'UTF-8', 20, 'offerte_dettaglio_articoliDetailEdit0offerte_handler');
$pageView->SetRecordPermission(GetCurrentUserRecordPermissionsForDataSource('offerte.offerte_dettaglio_articoli'));
$handler = new PageHTTPHandler('offerte_dettaglio_articoliDetailView0offerte_handler', $pageView);
GetApplication()->RegisterHTTPHandler($handler);
$pageEdit = new offerte_dettaglio_articoliDetailEdit0offertePage($this, array('ofa-offid'), array('id'), $this->GetForeingKeyFields(), $this->CreateMasterDetailRecordGridForofferte_dettaglio_articoliDetailEdit0offerteGrid(), $this->dataset, GetCurrentUserGrantForDataSource('offerte.offerte_dettaglio_articoli'), 'UTF-8');
$pageEdit->SetRecordPermission(GetCurrentUserRecordPermissionsForDataSource('offerte.offerte_dettaglio_articoli'));
$pageEdit->SetShortCaption('Offerte Dettaglio Articoli');
$pageEdit->SetHeader(GetPagesHeader());
$pageEdit->SetFooter(GetPagesFooter());
$pageEdit->SetCaption('Offerte Dettaglio Articoli');
$pageEdit->SetHttpHandlerName('offerte_dettaglio_articoliDetailEdit0offerte_handler');
$handler = new PageHTTPHandler('offerte_dettaglio_articoliDetailEdit0offerte_handler', $pageEdit);
GetApplication()->RegisterHTTPHandler($handler);
return $result;
}
示例3: CreateGrid
protected function CreateGrid()
{
$result = new Grid($this, $this->dataset, 'empresaGrid');
if ($this->GetSecurityInfo()->HasDeleteGrant()) {
$result->SetAllowDeleteSelected(false);
} else {
$result->SetAllowDeleteSelected(false);
}
ApplyCommonPageSettings($this, $result);
$result->SetUseImagesForActions(true);
$result->SetUseFixedHeader(false);
$result->SetShowLineNumbers(false);
$result->SetHighlightRowAtHover(false);
$result->SetWidth('');
$this->CreateGridSearchControl($result);
$this->CreateGridAdvancedSearchControl($result);
$this->AddFieldColumns($result);
$this->AddSingleRecordViewColumns($result);
$this->AddEditColumns($result);
$this->AddInsertColumns($result);
$this->AddPrintColumns($result);
$this->AddExportColumns($result);
$this->AddOperationsColumns($result);
$this->SetShowPageList(true);
$this->SetHidePageListByDefault(false);
$this->SetExportToExcelAvailable(true);
$this->SetExportToWordAvailable(true);
$this->SetExportToXmlAvailable(true);
$this->SetExportToCsvAvailable(true);
$this->SetExportToPdfAvailable(true);
$this->SetPrinterFriendlyAvailable(true);
$this->SetSimpleSearchAvailable(true);
$this->SetAdvancedSearchAvailable(true);
$this->SetFilterRowAvailable(true);
$this->SetVisualEffectsEnabled(true);
$this->SetShowTopPageNavigator(true);
$this->SetShowBottomPageNavigator(true);
//
// Http Handlers
//
//
// View column for nombre field
//
$column = new TextViewColumn('nombre', 'Nombre', $this->dataset);
$column->SetOrderable(true);
/* <inline edit column> */
//
// Edit column for nombre field
//
$editor = new TextEdit('nombre_edit');
$editor->SetSize(80);
$editor->SetMaxLength(80);
$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);
$column->SetEditOperationColumn($editColumn);
/* </inline edit column> */
/* <inline insert column> */
//
// Edit column for nombre field
//
$editor = new TextEdit('nombre_edit');
$editor->SetSize(80);
$editor->SetMaxLength(80);
$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);
$column->SetInsertOperationColumn($editColumn);
/* </inline insert column> */
$handler = new ShowTextBlobHandler($this->dataset, $this, 'nombre_handler', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for depto field
//
$column = new TextViewColumn('depto', 'Depto', $this->dataset);
$column->SetOrderable(true);
/* <inline edit column> */
//
// Edit column for depto field
//
$editor = new TextAreaEdit('depto_edit', 50, 8);
$editColumn = new CustomEditColumn('Depto', 'depto', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$column->SetEditOperationColumn($editColumn);
/* </inline edit column> */
/* <inline insert column> */
//
// Edit column for depto field
//
$editor = new TextAreaEdit('depto_edit', 50, 8);
$editColumn = new CustomEditColumn('Depto', 'depto', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$column->SetInsertOperationColumn($editColumn);
/* </inline insert column> */
$handler = new ShowTextBlobHandler($this->dataset, $this, 'depto_handler', $column);
GetApplication()->RegisterHTTPHandler($handler);
//.........这里部分代码省略.........
示例4: CreateGrid
protected function CreateGrid()
{
$result = new Grid($this, $this->dataset, 'activosGrid');
if ($this->GetSecurityInfo()->HasDeleteGrant()) {
$result->SetAllowDeleteSelected(false);
} else {
$result->SetAllowDeleteSelected(false);
}
ApplyCommonPageSettings($this, $result);
$result->SetUseImagesForActions(true);
$result->SetUseFixedHeader(false);
$result->SetShowLineNumbers(false);
$result->SetHighlightRowAtHover(false);
$result->SetWidth('');
$this->CreateGridSearchControl($result);
$this->CreateGridAdvancedSearchControl($result);
$this->AddFieldColumns($result);
$this->AddSingleRecordViewColumns($result);
$this->AddEditColumns($result);
$this->AddInsertColumns($result);
$this->AddPrintColumns($result);
$this->AddExportColumns($result);
$this->AddOperationsColumns($result);
$this->SetShowPageList(true);
$this->SetHidePageListByDefault(false);
$this->SetExportToExcelAvailable(true);
$this->SetExportToWordAvailable(true);
$this->SetExportToXmlAvailable(true);
$this->SetExportToCsvAvailable(true);
$this->SetExportToPdfAvailable(true);
$this->SetPrinterFriendlyAvailable(true);
$this->SetSimpleSearchAvailable(true);
$this->SetAdvancedSearchAvailable(true);
$this->SetFilterRowAvailable(true);
$this->SetVisualEffectsEnabled(true);
$this->SetShowTopPageNavigator(true);
$this->SetShowBottomPageNavigator(true);
//
// Http Handlers
//
$pageView = new act_movimientosDetailView0activosPage($this, 'Act Movimientos', 'Act Movimientos', array('idActivo'), GetCurrentUserGrantForDataSource('activos.act_movimientos'), 'UTF-8', 20, 'act_movimientosDetailEdit0activos_handler');
$pageView->SetRecordPermission(GetCurrentUserRecordPermissionsForDataSource('activos.act_movimientos'));
$handler = new PageHTTPHandler('act_movimientosDetailView0activos_handler', $pageView);
GetApplication()->RegisterHTTPHandler($handler);
$pageEdit = new act_movimientosDetailEdit0activosPage($this, array('idActivo'), array('idActivos'), $this->GetForeingKeyFields(), $this->CreateMasterDetailRecordGridForact_movimientosDetailEdit0activosGrid(), $this->dataset, GetCurrentUserGrantForDataSource('activos.act_movimientos'), 'UTF-8');
$pageEdit->SetRecordPermission(GetCurrentUserRecordPermissionsForDataSource('activos.act_movimientos'));
$pageEdit->SetShortCaption('Act Movimientos');
$pageEdit->SetHeader(GetPagesHeader());
$pageEdit->SetFooter(GetPagesFooter());
$pageEdit->SetCaption('Act Movimientos');
$pageEdit->SetHttpHandlerName('act_movimientosDetailEdit0activos_handler');
$handler = new PageHTTPHandler('act_movimientosDetailEdit0activos_handler', $pageEdit);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for NombreAct field
//
$column = new TextViewColumn('NombreAct', 'NombreAct', $this->dataset);
$column->SetOrderable(true);
/* <inline edit column> */
//
// Edit column for NombreAct field
//
$editor = new TextAreaEdit('nombreact_edit', 50, 8);
$editColumn = new CustomEditColumn('NombreAct', 'NombreAct', $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 NombreAct field
//
$editor = new TextAreaEdit('nombreact_edit', 50, 8);
$editColumn = new CustomEditColumn('NombreAct', 'NombreAct', $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> */
$handler = new ShowTextBlobHandler($this->dataset, $this, 'NombreAct_handler', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for Marca field
//
$column = new TextViewColumn('Marca', 'Marca', $this->dataset);
$column->SetOrderable(true);
/* <inline edit column> */
//
// Edit column for Marca field
//
$editor = new TextEdit('marca_edit');
$editor->SetSize(100);
$editor->SetMaxLength(100);
$editColumn = new CustomEditColumn('Marca', 'Marca', $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> */
//.........这里部分代码省略.........
示例5: CreateGrid
protected function CreateGrid()
{
$result = new Grid($this, $this->dataset, 'field_namesGrid');
if ($this->GetSecurityInfo()->HasDeleteGrant()) {
$result->SetAllowDeleteSelected(true);
} else {
$result->SetAllowDeleteSelected(false);
}
ApplyCommonPageSettings($this, $result);
$result->SetUseImagesForActions(true);
$result->SetUseFixedHeader(false);
$result->SetShowLineNumbers(false);
$result->SetHighlightRowAtHover(false);
$result->SetWidth('');
$this->CreateGridSearchControl($result);
$this->CreateGridAdvancedSearchControl($result);
$this->AddOperationsColumns($result);
$this->AddFieldColumns($result);
$this->AddSingleRecordViewColumns($result);
$this->AddEditColumns($result);
$this->AddInsertColumns($result);
$this->AddPrintColumns($result);
$this->AddExportColumns($result);
$this->SetShowPageList(true);
$this->SetHidePageListByDefault(false);
$this->SetExportToExcelAvailable(true);
$this->SetExportToWordAvailable(true);
$this->SetExportToXmlAvailable(false);
$this->SetExportToCsvAvailable(true);
$this->SetExportToPdfAvailable(true);
$this->SetPrinterFriendlyAvailable(true);
$this->SetSimpleSearchAvailable(true);
$this->SetAdvancedSearchAvailable(true);
$this->SetFilterRowAvailable(true);
$this->SetVisualEffectsEnabled(true);
$this->SetShowTopPageNavigator(true);
$this->SetShowBottomPageNavigator(true);
//
// Http Handlers
//
//
// View column for task_name field
//
$column = new TextViewColumn('task_name', 'Task Name', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'field_namesGrid_task_name_handler_list', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for public_engagement field
//
$column = new TextViewColumn('public_engagement', 'Public Engagement', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'field_namesGrid_public_engagement_handler_list', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for level_of_service field
//
$column = new TextViewColumn('level_of_service', 'Level Of Service', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'field_namesGrid_level_of_service_handler_list', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for project_type field
//
$column = new TextViewColumn('project_type', 'Project Type', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'field_namesGrid_project_type_handler_list', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for task_name field
//
$column = new TextViewColumn('task_name', 'Task Name', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'field_namesGrid_task_name_handler_view', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for public_engagement field
//
$column = new TextViewColumn('public_engagement', 'Public Engagement', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'field_namesGrid_public_engagement_handler_view', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for level_of_service field
//
$column = new TextViewColumn('level_of_service', 'Level Of Service', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'field_namesGrid_level_of_service_handler_view', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for project_type field
//
$column = new TextViewColumn('project_type', 'Project Type', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'field_namesGrid_project_type_handler_view', $column);
GetApplication()->RegisterHTTPHandler($handler);
return $result;
}
示例6: CreateGrid
protected function CreateGrid()
{
$result = new Grid($this, $this->dataset, 'projectGrid');
if ($this->GetSecurityInfo()->HasDeleteGrant()) {
$result->SetAllowDeleteSelected(true);
} else {
$result->SetAllowDeleteSelected(false);
}
ApplyCommonPageSettings($this, $result);
$result->SetUseImagesForActions(true);
$result->SetInsertClientValidationScript($this->RenderText('if ( Number(fieldValues[\'budget_spent\']) > Number(fieldValues[\'approved_budget\']))
{
errorInfo.SetMessage(\'"Budget spent is greater than the Approved Budget"\');
return false;
}
else if
(fieldValues[\'date_start\'] >= fieldValues[\'date_end\'])
{
errorInfo.SetMessage(\'"Start date is greater than or equal to End date"\');
return false;
}'));
$result->SetEditClientFormLoadedScript($this->RenderText('if (editors[\'approved\'].getValue() == 1) {
editors[\'programm_id\'].setEnabled(false);
editors[\'project_name\'].setEnabled(false);
editors[\'date_start\'].setEnabled(false);
editors[\'date_end\'].setEnabled(false);
editors[\'approved_budget\'].setEnabled(false);
editors[\'notes\'].setEnabled(false);
editors[\'priority\'].setEnabled(false);
editors[\'lead\'].setEnabled(false);
editors[\'level_of_service\'].setEnabled(false);
editors[\'multi_year\'].setEnabled(false);
editors[\'public_engagement\'].setEnabled(false);
editors[\'year\'].setEnabled(false);
editors[\'dept_id\'].setEnabled(false);
}
else
{
editors[\'programm_id\'].setEnabled(true);
editors[\'project_name\'].setEnabled(true);
editors[\'date_start\'].setEnabled(true);
editors[\'date_end\'].setEnabled(true);
editors[\'approved_budget\'].setEnabled(true);
editors[\'notes\'].setEnabled(true);
editors[\'priority\'].setEnabled(true);
editors[\'lead\'].setEnabled(true);
editors[\'level_of_service\'].setEnabled(true);
editors[\'multi_year\'].setEnabled(true);
editors[\'public_engagement\'].setEnabled(true);
editors[\'year\'].setEnabled(true);
editors[\'dept_id\'].setEnabled(true);
}'));
$result->SetEditClientValidationScript($this->RenderText('if ( Number(fieldValues[\'budget_spent\']) > Number(fieldValues[\'approved_budget\']))
{
errorInfo.SetMessage(\'"Budget spent is greater than the Approved Budget"\');
return false;
}
else if
(fieldValues[\'date_start\'] >= fieldValues[\'date_end\'])
{
errorInfo.SetMessage(\'"Start date is greater than or equal to End date"\');
return false;
}'));
$result->SetUseFixedHeader(false);
$result->SetShowLineNumbers(false);
$result->SetHighlightRowAtHover(false);
$result->SetWidth('');
$this->OnGetCustomTemplate->AddListener('projectGrid' . '_OnGetCustomTemplate', $this);
$result->OnCustomDrawCell->AddListener('projectGrid' . '_OnCustomDrawRow', $this);
$result->OnCustomRenderColumn->AddListener('projectGrid' . '_' . 'OnCustomRenderColumn', $this);
$result->OnCustomRenderTotal->AddListener('projectGrid' . '_' . 'OnCustomRenderTotal', $this);
$result->BeforeUpdateRecord->AddListener('projectGrid' . '_' . 'BeforeUpdateRecord', $this);
$result->BeforeInsertRecord->AddListener('projectGrid' . '_' . 'BeforeInsertRecord', $this);
$this->CreateGridSearchControl($result);
$this->CreateGridAdvancedSearchControl($result);
$this->AddOperationsColumns($result);
$this->AddFieldColumns($result);
$this->AddSingleRecordViewColumns($result);
$this->AddEditColumns($result);
$this->AddInsertColumns($result);
$this->AddPrintColumns($result);
$this->AddExportColumns($result);
$this->SetShowPageList(true);
$this->SetHidePageListByDefault(false);
$this->SetExportToExcelAvailable(true);
$this->SetExportToWordAvailable(true);
$this->SetExportToXmlAvailable(false);
$this->SetExportToCsvAvailable(true);
$this->SetExportToPdfAvailable(true);
$this->SetPrinterFriendlyAvailable(true);
$this->SetSimpleSearchAvailable(true);
$this->SetAdvancedSearchAvailable(true);
$this->SetFilterRowAvailable(true);
$this->SetVisualEffectsEnabled(true);
$this->SetShowTopPageNavigator(true);
$this->SetShowBottomPageNavigator(true);
//
// Http Handlers
//.........这里部分代码省略.........
示例7: CreateGrid
protected function CreateGrid()
{
$result = new Grid($this, $this->dataset, 'GE_PERSONAGrid');
if ($this->GetSecurityInfo()->HasDeleteGrant()) {
$result->SetAllowDeleteSelected(true);
} else {
$result->SetAllowDeleteSelected(false);
}
ApplyCommonPageSettings($this, $result);
$result->SetUseImagesForActions(false);
$result->SetUseFixedHeader(false);
$result->SetShowLineNumbers(false);
$result->SetHighlightRowAtHover(false);
$result->SetWidth('');
$this->CreateGridSearchControl($result);
$this->CreateGridAdvancedSearchControl($result);
$this->AddOperationsColumns($result);
$this->AddFieldColumns($result);
$this->AddSingleRecordViewColumns($result);
$this->AddEditColumns($result);
$this->AddInsertColumns($result);
$this->AddPrintColumns($result);
$this->AddExportColumns($result);
$this->SetShowPageList(true);
$this->SetHidePageListByDefault(false);
$this->SetExportToExcelAvailable(false);
$this->SetExportToWordAvailable(false);
$this->SetExportToXmlAvailable(false);
$this->SetExportToCsvAvailable(false);
$this->SetExportToPdfAvailable(false);
$this->SetPrinterFriendlyAvailable(false);
$this->SetSimpleSearchAvailable(true);
$this->SetAdvancedSearchAvailable(false);
$this->SetFilterRowAvailable(false);
$this->SetVisualEffectsEnabled(false);
$this->SetShowTopPageNavigator(true);
$this->SetShowBottomPageNavigator(true);
//
// Http Handlers
//
//
// View column for SLOGAN field
//
$column = new TextViewColumn('SLOGAN', 'SLOGAN', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'GE_PERSONAGrid_SLOGAN_handler_list', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for EMAIL field
//
$column = new TextViewColumn('EMAIL', 'EMAIL', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'GE_PERSONAGrid_EMAIL_handler_list', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for SLOGAN field
//
$column = new TextViewColumn('SLOGAN', 'SLOGAN', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'GE_PERSONAGrid_SLOGAN_handler_view', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for EMAIL field
//
$column = new TextViewColumn('EMAIL', 'EMAIL', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'GE_PERSONAGrid_EMAIL_handler_view', $column);
GetApplication()->RegisterHTTPHandler($handler);
return $result;
}
示例8: CreateGrid
protected function CreateGrid()
{
$result = new Grid($this, $this->dataset, 'clientiGrid');
if ($this->GetSecurityInfo()->HasDeleteGrant()) {
$result->SetAllowDeleteSelected(false);
} else {
$result->SetAllowDeleteSelected(false);
}
ApplyCommonPageSettings($this, $result);
$result->SetUseImagesForActions(true);
$result->SetUseFixedHeader(false);
$result->SetShowLineNumbers(false);
$result->SetHighlightRowAtHover(false);
$result->SetWidth('');
$result->BeforeUpdateRecord->AddListener('clientiGrid' . '_' . 'BeforeUpdateRecord', $this);
$result->BeforeInsertRecord->AddListener('clientiGrid' . '_' . 'BeforeInsertRecord', $this);
$this->CreateGridSearchControl($result);
$this->CreateGridAdvancedSearchControl($result);
$this->AddFieldColumns($result);
$this->AddSingleRecordViewColumns($result);
$this->AddEditColumns($result);
$this->AddInsertColumns($result);
$this->AddPrintColumns($result);
$this->AddExportColumns($result);
$this->AddOperationsColumns($result);
$this->SetShowPageList(true);
$this->SetHidePageListByDefault(false);
$this->SetExportToExcelAvailable(false);
$this->SetExportToWordAvailable(false);
$this->SetExportToXmlAvailable(false);
$this->SetExportToCsvAvailable(false);
$this->SetExportToPdfAvailable(false);
$this->SetPrinterFriendlyAvailable(false);
$this->SetSimpleSearchAvailable(true);
$this->SetAdvancedSearchAvailable(false);
$this->SetFilterRowAvailable(false);
$this->SetVisualEffectsEnabled(true);
$this->SetShowTopPageNavigator(false);
$this->SetShowBottomPageNavigator(false);
//
// Http Handlers
//
//
// View column for cli-codcli field
//
$column = new TextViewColumn('cli-codcli', 'Codice Cliente', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'clientiGrid_cli-codcli_handler_list', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for cli-ragsoc field
//
$column = new TextViewColumn('cli-ragsoc', 'Ragione sociale', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'clientiGrid_cli-ragsoc_handler_list', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for cli-codcli field
//
$column = new TextViewColumn('cli-codcli', 'Codice Cliente', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'clientiGrid_cli-codcli_handler_view', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for cli-ragsoc field
//
$column = new TextViewColumn('cli-ragsoc', 'Ragione sociale', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'clientiGrid_cli-ragsoc_handler_view', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for cli-codcli field
//
$column = new TextViewColumn('cli-codcli', 'Codice Cliente', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'clientiGrid_cli-codcli_handler_print', $column);
GetApplication()->RegisterHTTPHandler($handler);
return $result;
}
示例9: CreateGrid
protected function CreateGrid()
{
$result = new Grid($this, $this->dataset, 'GE_FOTOGrid');
if ($this->GetSecurityInfo()->HasDeleteGrant()) {
$result->SetAllowDeleteSelected(true);
} else {
$result->SetAllowDeleteSelected(false);
}
ApplyCommonPageSettings($this, $result);
$result->SetUseImagesForActions(false);
$result->SetUseFixedHeader(false);
$result->SetShowLineNumbers(false);
$result->SetHighlightRowAtHover(false);
$result->SetWidth('');
$this->CreateGridSearchControl($result);
$this->CreateGridAdvancedSearchControl($result);
$this->AddOperationsColumns($result);
$this->AddFieldColumns($result);
$this->AddSingleRecordViewColumns($result);
$this->AddEditColumns($result);
$this->AddInsertColumns($result);
$this->AddPrintColumns($result);
$this->AddExportColumns($result);
$this->SetShowPageList(true);
$this->SetHidePageListByDefault(false);
$this->SetExportToExcelAvailable(false);
$this->SetExportToWordAvailable(false);
$this->SetExportToXmlAvailable(false);
$this->SetExportToCsvAvailable(false);
$this->SetExportToPdfAvailable(false);
$this->SetPrinterFriendlyAvailable(false);
$this->SetSimpleSearchAvailable(true);
$this->SetAdvancedSearchAvailable(false);
$this->SetFilterRowAvailable(false);
$this->SetVisualEffectsEnabled(false);
$this->SetShowTopPageNavigator(true);
$this->SetShowBottomPageNavigator(true);
//
// Http Handlers
//
$handler = new DownloadHTTPHandler($this->dataset, 'RUTA', 'RUTA_handler', '', '', true);
GetApplication()->RegisterHTTPHandler($handler);
$handler = new DownloadHTTPHandler($this->dataset, 'RUTA', 'RUTA_handler', '', '', true);
GetApplication()->RegisterHTTPHandler($handler);
$handler = new ImageHTTPHandler($this->dataset, 'RUTA', 'GE_FOTOGrid_RUTA_handler_edit', new NullFilter());
GetApplication()->RegisterHTTPHandler($handler);
$handler = new ImageHTTPHandler($this->dataset, 'RUTA', 'GE_FOTOGrid_RUTA_handler_insert', new NullFilter());
GetApplication()->RegisterHTTPHandler($handler);
$handler = new DownloadHTTPHandler($this->dataset, 'RUTA', 'RUTA_handler', '', '', true);
GetApplication()->RegisterHTTPHandler($handler);
return $result;
}
示例10: CreateGrid
protected function CreateGrid()
{
$result = new Grid($this, $this->dataset, 'planificacionGrid');
if ($this->GetSecurityInfo()->HasDeleteGrant()) {
$result->SetAllowDeleteSelected(true);
} else {
$result->SetAllowDeleteSelected(false);
}
ApplyCommonPageSettings($this, $result);
$result->SetUseImagesForActions(true);
$result->SetUseFixedHeader(false);
$result->SetShowLineNumbers(false);
$result->SetShowKeyColumnsImagesInHeader(false);
$result->SetViewMode(ViewMode::TABLE);
$result->setEnableRuntimeCustomization(true);
$result->SetHighlightRowAtHover(false);
$result->SetWidth('');
$this->CreateGridSearchControl($result);
$this->CreateGridAdvancedSearchControl($result);
$this->AddOperationsColumns($result);
$this->AddFieldColumns($result);
$this->AddSingleRecordViewColumns($result);
$this->AddEditColumns($result);
$this->AddInsertColumns($result);
$this->AddPrintColumns($result);
$this->AddExportColumns($result);
$this->SetShowPageList(true);
$this->SetExportToExcelAvailable(true);
$this->SetExportToWordAvailable(true);
$this->SetExportToXmlAvailable(true);
$this->SetExportToCsvAvailable(true);
$this->SetExportToPdfAvailable(true);
$this->SetPrinterFriendlyAvailable(true);
$this->SetSimpleSearchAvailable(true);
$this->SetAdvancedSearchAvailable(true);
$this->SetVisualEffectsEnabled(true);
$this->SetShowTopPageNavigator(true);
$this->SetShowBottomPageNavigator(true);
//
// Http Handlers
//
$pageView = new actividadDetailView0planificacionPage($this, 'Actividades', 'Actividades', array('id_planificacion'), GetCurrentUserGrantForDataSource('planificacion.actividad'), 'UTF-8', 20, 'actividadDetailEdit0planificacion_handler');
$pageView->SetRecordPermission(GetCurrentUserRecordPermissionsForDataSource('planificacion.actividad'));
$handler = new PageHTTPHandler('actividadDetailView0planificacion_handler', $pageView);
GetApplication()->RegisterHTTPHandler($handler);
$pageEdit = new actividadDetailEdit0planificacionPage($this, array('id_planificacion'), array('id'), $this->GetForeingKeyFields(), $this->CreateMasterDetailRecordGridForactividadDetailEdit0planificacionGrid(), $this->dataset, GetCurrentUserGrantForDataSource('planificacion.actividad'), 'UTF-8');
$pageEdit->SetRecordPermission(GetCurrentUserRecordPermissionsForDataSource('planificacion.actividad'));
$pageEdit->SetShortCaption('Actividades');
$pageEdit->SetHeader(GetPagesHeader());
$pageEdit->SetFooter(GetPagesFooter());
$pageEdit->SetCaption('Actividades');
$pageEdit->SetHttpHandlerName('actividadDetailEdit0planificacion_handler');
$handler = new PageHTTPHandler('actividadDetailEdit0planificacion_handler', $pageEdit);
GetApplication()->RegisterHTTPHandler($handler);
$pageView = new objeto_planificacionDetailView1planificacionPage($this, 'Objetos a Aplicar', 'Objetos a Aplicar', array('id_planificacion'), GetCurrentUserGrantForDataSource('planificacion.objeto_planificacion'), 'UTF-8', 20, 'objeto_planificacionDetailEdit1planificacion_handler');
$pageView->SetRecordPermission(GetCurrentUserRecordPermissionsForDataSource('planificacion.objeto_planificacion'));
$handler = new PageHTTPHandler('objeto_planificacionDetailView1planificacion_handler', $pageView);
GetApplication()->RegisterHTTPHandler($handler);
$pageEdit = new objeto_planificacionDetailEdit1planificacionPage($this, array('id_planificacion'), array('id'), $this->GetForeingKeyFields(), $this->CreateMasterDetailRecordGridForobjeto_planificacionDetailEdit1planificacionGrid(), $this->dataset, GetCurrentUserGrantForDataSource('planificacion.objeto_planificacion'), 'UTF-8');
$pageEdit->SetRecordPermission(GetCurrentUserRecordPermissionsForDataSource('planificacion.objeto_planificacion'));
$pageEdit->SetShortCaption('Objetos a Aplicar');
$pageEdit->SetHeader(GetPagesHeader());
$pageEdit->SetFooter(GetPagesFooter());
$pageEdit->SetCaption('Objetos a Aplicar');
$pageEdit->SetHttpHandlerName('objeto_planificacionDetailEdit1planificacion_handler');
$handler = new PageHTTPHandler('objeto_planificacionDetailEdit1planificacion_handler', $pageEdit);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for descripcion field
//
$column = new TextViewColumn('descripcion', 'Descripción', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'planificacionGrid_descripcion_handler_list', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for criterios_aceptacion field
//
$column = new TextViewColumn('criterios_aceptacion', 'Criterios Aceptación', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'planificacionGrid_criterios_aceptacion_handler_list', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for observaciones field
//
$column = new TextViewColumn('observaciones', 'Observaciones', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'planificacionGrid_observaciones_handler_list', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for descripcion field
//
$column = new TextViewColumn('descripcion', 'Descripción', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'planificacionGrid_descripcion_handler_view', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for criterios_aceptacion field
//
$column = new TextViewColumn('criterios_aceptacion', 'Criterios Aceptación', $this->dataset);
$column->SetOrderable(true);
//.........这里部分代码省略.........
示例11: CreateGrid
protected function CreateGrid()
{
$result = new Grid($this, $this->dataset, 'hometextGrid');
if ($this->GetSecurityInfo()->HasDeleteGrant()) {
$result->SetAllowDeleteSelected(false);
} else {
$result->SetAllowDeleteSelected(false);
}
ApplyCommonPageSettings($this, $result);
$result->SetUseImagesForActions(false);
$result->SetUseFixedHeader(false);
$result->SetShowLineNumbers(false);
$result->SetHighlightRowAtHover(true);
$result->SetWidth('');
$this->CreateGridSearchControl($result);
$this->CreateGridAdvancedSearchControl($result);
$this->AddOperationsColumns($result);
$this->AddFieldColumns($result);
$this->AddSingleRecordViewColumns($result);
$this->AddEditColumns($result);
$this->AddInsertColumns($result);
$this->AddPrintColumns($result);
$this->AddExportColumns($result);
$this->SetShowPageList(true);
$this->SetHidePageListByDefault(false);
$this->SetExportToExcelAvailable(false);
$this->SetExportToWordAvailable(false);
$this->SetExportToXmlAvailable(false);
$this->SetExportToCsvAvailable(false);
$this->SetExportToPdfAvailable(false);
$this->SetPrinterFriendlyAvailable(false);
$this->SetSimpleSearchAvailable(false);
$this->SetAdvancedSearchAvailable(false);
$this->SetFilterRowAvailable(false);
$this->SetVisualEffectsEnabled(false);
$this->SetShowTopPageNavigator(false);
$this->SetShowBottomPageNavigator(false);
//
// Http Handlers
//
//
// View column for text field
//
$column = new TextViewColumn('text', 'Text', $this->dataset);
$column->SetOrderable(true);
/* <inline edit column> */
//
// Edit column for text field
//
$editor = new HtmlWysiwygEditor('text_edit');
$editor->SetAllowColorControls(true);
$editColumn = new CustomEditColumn('Text', 'text', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$column->SetEditOperationColumn($editColumn);
/* </inline edit column> */
/* <inline insert column> */
//
// Edit column for text field
//
$editor = new HtmlWysiwygEditor('text_edit');
$editor->SetAllowColorControls(true);
$editColumn = new CustomEditColumn('Text', 'text', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$column->SetInsertOperationColumn($editColumn);
/* </inline insert column> */
$column = new DivTagViewColumnDecorator($column);
$column->Align = 'left';
$handler = new ShowTextBlobHandler($this->dataset, $this, 'text_handler', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for text field
//
$column = new TextViewColumn('text', 'Text', $this->dataset);
$column->SetOrderable(true);
$column = new DivTagViewColumnDecorator($column);
$column->Align = 'left';
$handler = new ShowTextBlobHandler($this->dataset, $this, 'text_handler', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for id field
//
$column = new TextViewColumn('id', 'Id', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'id_handler', $column);
GetApplication()->RegisterHTTPHandler($handler);
return $result;
}
示例12: CreateGrid
protected function CreateGrid()
{
$result = new Grid($this, $this->dataset, 'imvGrid');
if ($this->GetSecurityInfo()->HasDeleteGrant()) {
$result->SetAllowDeleteSelected(false);
} else {
$result->SetAllowDeleteSelected(false);
}
ApplyCommonPageSettings($this, $result);
$result->SetUseImagesForActions(true);
$result->SetUseFixedHeader(false);
$result->SetShowLineNumbers(false);
$result->SetHighlightRowAtHover(false);
$result->SetWidth('');
$this->CreateGridSearchControl($result);
$this->CreateGridAdvancedSearchControl($result);
$this->AddFieldColumns($result);
$this->AddSingleRecordViewColumns($result);
$this->AddEditColumns($result);
$this->AddInsertColumns($result);
$this->AddPrintColumns($result);
$this->AddExportColumns($result);
$this->AddOperationsColumns($result);
$this->SetShowPageList(true);
$this->SetHidePageListByDefault(false);
$this->SetExportToExcelAvailable(true);
$this->SetExportToWordAvailable(true);
$this->SetExportToXmlAvailable(true);
$this->SetExportToCsvAvailable(true);
$this->SetExportToPdfAvailable(true);
$this->SetPrinterFriendlyAvailable(true);
$this->SetSimpleSearchAvailable(true);
$this->SetAdvancedSearchAvailable(true);
$this->SetFilterRowAvailable(true);
$this->SetVisualEffectsEnabled(true);
$this->SetShowTopPageNavigator(true);
$this->SetShowBottomPageNavigator(true);
//
// Http Handlers
//
$pageView = new kardexmercanciasDetailView0imvPage($this, 'Kardexmercancias', 'Kardexmercancias', array('ProductosVenta_idProductosVenta'), GetCurrentUserGrantForDataSource('imv.'), 'UTF-8', 20, 'kardexmercanciasDetailEdit0imv_handler');
$pageView->SetRecordPermission(GetCurrentUserRecordPermissionsForDataSource('imv.'));
$handler = new PageHTTPHandler('kardexmercanciasDetailView0imv_handler', $pageView);
GetApplication()->RegisterHTTPHandler($handler);
$pageEdit = new kardexmercanciasDetailEdit0imvPage($this, array('ProductosVenta_idProductosVenta'), array('id'), $this->GetForeingKeyFields(), $this->CreateMasterDetailRecordGridForkardexmercanciasDetailEdit0imvGrid(), $this->dataset, GetCurrentUserGrantForDataSource('imv.'), 'UTF-8');
$pageEdit->SetRecordPermission(GetCurrentUserRecordPermissionsForDataSource('imv.'));
$pageEdit->SetShortCaption('Kardexmercancias');
$pageEdit->SetHeader(GetPagesHeader());
$pageEdit->SetFooter(GetPagesFooter());
$pageEdit->SetCaption('Kardexmercancias');
$pageEdit->SetHttpHandlerName('kardexmercanciasDetailEdit0imv_handler');
$handler = new PageHTTPHandler('kardexmercanciasDetailEdit0imv_handler', $pageEdit);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for cod_cups field
//
$column = new TextViewColumn('cod_cups', 'Cod Cups', $this->dataset);
$column->SetOrderable(true);
/* <inline edit column> */
//
// Edit column for cod_cups field
//
$editor = new TextEdit('cod_cups_edit');
$editor->SetSize(100);
$editor->SetMaxLength(100);
$editColumn = new CustomEditColumn('Cod Cups', 'cod_cups', $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 cod_cups field
//
$editor = new TextEdit('cod_cups_edit');
$editor->SetSize(100);
$editor->SetMaxLength(100);
$editColumn = new CustomEditColumn('Cod Cups', 'cod_cups', $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> */
$handler = new ShowTextBlobHandler($this->dataset, $this, 'cod_cups_handler', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for cod_admin field
//
$column = new TextViewColumn('cod_admin', 'Cod Admin', $this->dataset);
$column->SetOrderable(true);
/* <inline edit column> */
//
// Edit column for cod_admin field
//
$editor = new TextEdit('cod_admin_edit');
$editor->SetSize(100);
$editor->SetMaxLength(100);
$editColumn = new CustomEditColumn('Cod Admin', 'cod_admin', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
//.........这里部分代码省略.........
示例13: CreateGrid
protected function CreateGrid()
{
$result = new Grid($this, $this->dataset, 'taskGrid');
if ($this->GetSecurityInfo()->HasDeleteGrant()) {
$result->SetAllowDeleteSelected(true);
} else {
$result->SetAllowDeleteSelected(false);
}
ApplyCommonPageSettings($this, $result);
$result->SetUseImagesForActions(true);
$result->SetUseFixedHeader(false);
$result->SetShowLineNumbers(false);
$result->SetHighlightRowAtHover(false);
$result->SetWidth('');
$result->OnCustomRenderTotal->AddListener('taskGrid' . '_' . 'OnCustomRenderTotal', $this);
$result->BeforeUpdateRecord->AddListener('taskGrid' . '_' . 'BeforeUpdateRecord', $this);
$result->BeforeDeleteRecord->AddListener('taskGrid' . '_' . 'BeforeDeleteRecord', $this);
$result->BeforeInsertRecord->AddListener('taskGrid' . '_' . 'BeforeInsertRecord', $this);
$this->CreateGridSearchControl($result);
$this->CreateGridAdvancedSearchControl($result);
$this->AddOperationsColumns($result);
$this->AddFieldColumns($result);
$this->AddSingleRecordViewColumns($result);
$this->AddEditColumns($result);
$this->AddInsertColumns($result);
$this->AddPrintColumns($result);
$this->AddExportColumns($result);
$this->SetShowPageList(true);
$this->SetHidePageListByDefault(false);
$this->SetExportToExcelAvailable(true);
$this->SetExportToWordAvailable(true);
$this->SetExportToXmlAvailable(false);
$this->SetExportToCsvAvailable(true);
$this->SetExportToPdfAvailable(true);
$this->SetPrinterFriendlyAvailable(true);
$this->SetSimpleSearchAvailable(true);
$this->SetAdvancedSearchAvailable(true);
$this->SetFilterRowAvailable(true);
$this->SetVisualEffectsEnabled(true);
$this->SetShowTopPageNavigator(true);
$this->SetShowBottomPageNavigator(true);
//
// Http Handlers
//
$pageView = new timesheetDetailView0taskPage($this, 'Timesheet', 'Timesheet', array('task_id'), GetCurrentUserGrantForDataSource('task.timesheet'), 'UTF-8', 20, 'timesheetDetailEdit0task_handler');
$pageView->SetRecordPermission(GetCurrentUserRecordPermissionsForDataSource('task.timesheet'));
$handler = new PageHTTPHandler('timesheetDetailView0task_handler', $pageView);
GetApplication()->RegisterHTTPHandler($handler);
$pageEdit = new timesheetDetailEdit0taskPage($this, array('task_id'), array('task_id'), $this->GetForeingKeyFields(), $this->CreateMasterDetailRecordGridFortimesheetDetailEdit0taskGrid(), $this->dataset, GetCurrentUserGrantForDataSource('task.timesheet'), 'UTF-8');
$pageEdit->SetRecordPermission(GetCurrentUserRecordPermissionsForDataSource('task.timesheet'));
$pageEdit->SetShortCaption('Timesheet');
$pageEdit->SetHeader(GetPagesHeader());
$pageEdit->SetFooter(GetPagesFooter());
$pageEdit->SetCaption('Timesheet');
$pageEdit->SetHttpHandlerName('timesheetDetailEdit0task_handler');
$handler = new PageHTTPHandler('timesheetDetailEdit0task_handler', $pageEdit);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for Name field
//
$column = new TextViewColumn('task_name_Name', 'Name', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'taskGrid_Name_handler_list', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for notes field
//
$column = new TextViewColumn('notes', 'Notes', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'taskGrid_notes_handler_list', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for Name field
//
$column = new TextViewColumn('task_name_Name', 'Name', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'taskGrid_Name_handler_view', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for notes field
//
$column = new TextViewColumn('notes', 'Notes', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'taskGrid_notes_handler_view', $column);
GetApplication()->RegisterHTTPHandler($handler);
$lookupDataset = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`task_names`');
$field = new IntegerField('id', null, null, true);
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, true);
$field = new StringField('Name');
$lookupDataset->AddField($field, false);
$lookupDataset->SetOrderBy('Name', GetOrderTypeAsSQL(otAscending));
$lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), ''));
$handler = new DynamicSearchHandler($lookupDataset, $this, 'edit_task_name_Name_search', 'Name', 'Name', null);
GetApplication()->RegisterHTTPHandler($handler);
$lookupDataset = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`task_names`');
$field = new IntegerField('id', null, null, true);
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, true);
$field = new StringField('Name');
//.........这里部分代码省略.........
示例14: CreateGrid
protected function CreateGrid()
{
$result = new Grid($this, $this->dataset, 'timesheetGrid');
if ($this->GetSecurityInfo()->HasDeleteGrant()) {
$result->SetAllowDeleteSelected(true);
} else {
$result->SetAllowDeleteSelected(false);
}
ApplyCommonPageSettings($this, $result);
$result->SetUseImagesForActions(true);
$result->SetInsertClientValidationScript($this->RenderText('if (fieldValues[\'date\'] > %CURRENT_DATE% INTERVAL 14 DAY )
{
errorInfo.SetMessage(\'Date Must be no older than 14 days\');
return false;
}'));
$result->SetUseFixedHeader(false);
$result->SetShowLineNumbers(false);
$result->SetHighlightRowAtHover(false);
$result->SetWidth('');
$result->OnCustomRenderTotal->AddListener('timesheetGrid' . '_' . 'OnCustomRenderTotal', $this);
$result->BeforeInsertRecord->AddListener('timesheetGrid' . '_' . 'BeforeInsertRecord', $this);
$this->CreateGridSearchControl($result);
$this->CreateGridAdvancedSearchControl($result);
$this->AddOperationsColumns($result);
$this->AddFieldColumns($result);
$this->AddSingleRecordViewColumns($result);
$this->AddEditColumns($result);
$this->AddInsertColumns($result);
$this->AddPrintColumns($result);
$this->AddExportColumns($result);
$this->SetShowPageList(true);
$this->SetHidePageListByDefault(false);
$this->SetExportToExcelAvailable(true);
$this->SetExportToWordAvailable(true);
$this->SetExportToXmlAvailable(false);
$this->SetExportToCsvAvailable(true);
$this->SetExportToPdfAvailable(true);
$this->SetPrinterFriendlyAvailable(true);
$this->SetSimpleSearchAvailable(true);
$this->SetAdvancedSearchAvailable(true);
$this->SetFilterRowAvailable(true);
$this->SetVisualEffectsEnabled(true);
$this->SetShowTopPageNavigator(true);
$this->SetShowBottomPageNavigator(true);
//
// Http Handlers
//
//
// View column for name field
//
$column = new TextViewColumn('name', 'Name', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'timesheetGrid_name_handler_list', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for notes field
//
$column = new TextViewColumn('notes', 'Notes', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'timesheetGrid_notes_handler_list', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for name field
//
$column = new TextViewColumn('name', 'Name', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'timesheetGrid_name_handler_view', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for notes field
//
$column = new TextViewColumn('notes', 'Notes', $this->dataset);
$column->SetOrderable(true);
$handler = new ShowTextBlobHandler($this->dataset, $this, 'timesheetGrid_notes_handler_view', $column);
GetApplication()->RegisterHTTPHandler($handler);
return $result;
}
示例15: CreateGrid
protected function CreateGrid()
{
$result = new Grid($this, $this->dataset, 'public_office_holderGrid');
if ($this->GetSecurityInfo()->HasDeleteGrant()) {
$result->SetAllowDeleteSelected(false);
} else {
$result->SetAllowDeleteSelected(false);
}
ApplyCommonPageSettings($this, $result);
$result->SetUseImagesForActions(false);
$result->SetUseFixedHeader(false);
$result->SetShowLineNumbers(false);
$result->SetUseModalInserting(true);
$result->SetHighlightRowAtHover(false);
$result->SetWidth('');
$this->CreateGridSearchControl($result);
$this->CreateGridAdvancedSearchControl($result);
$this->AddOperationsColumns($result);
$this->AddFieldColumns($result);
$this->AddSingleRecordViewColumns($result);
$this->AddEditColumns($result);
$this->AddInsertColumns($result);
$this->AddPrintColumns($result);
$this->AddExportColumns($result);
$this->SetShowPageList(true);
$this->SetHidePageListByDefault(false);
$this->SetExportToExcelAvailable(false);
$this->SetExportToWordAvailable(false);
$this->SetExportToXmlAvailable(false);
$this->SetExportToCsvAvailable(false);
$this->SetExportToPdfAvailable(false);
$this->SetPrinterFriendlyAvailable(false);
$this->SetSimpleSearchAvailable(true);
$this->SetAdvancedSearchAvailable(false);
$this->SetFilterRowAvailable(false);
$this->SetVisualEffectsEnabled(false);
$this->SetShowTopPageNavigator(true);
$this->SetShowBottomPageNavigator(true);
//
// Http Handlers
//
//
// View column for photo_link field
//
$column = new TextViewColumn('photo_link', 'Photo Link', $this->dataset);
$column->SetOrderable(true);
/* <inline edit column> */
//
// Edit column for photo_link field
//
$editor = new TextAreaEdit('photo_link_edit', 50, 8);
$editColumn = new CustomEditColumn('Photo Link', 'photo_link', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$column->SetEditOperationColumn($editColumn);
/* </inline edit column> */
/* <inline insert column> */
//
// Edit column for photo_link field
//
$editor = new TextAreaEdit('photo_link_edit', 50, 8);
$editColumn = new CustomEditColumn('Photo Link', 'photo_link', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$column->SetInsertOperationColumn($editColumn);
/* </inline insert column> */
$handler = new ShowTextBlobHandler($this->dataset, $this, 'public_office_holderGrid_photo_link_handler_list', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for notes field
//
$column = new TextViewColumn('notes', 'Notes', $this->dataset);
$column->SetOrderable(true);
/* <inline edit column> */
//
// Edit column for notes field
//
$editor = new TextAreaEdit('notes_edit', 50, 8);
$editColumn = new CustomEditColumn('Notes', 'notes', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$column->SetEditOperationColumn($editColumn);
/* </inline edit column> */
/* <inline insert column> */
//
// Edit column for notes field
//
$editor = new TextAreaEdit('notes_edit', 50, 8);
$editColumn = new CustomEditColumn('Notes', 'notes', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$column->SetInsertOperationColumn($editColumn);
/* </inline insert column> */
$handler = new ShowTextBlobHandler($this->dataset, $this, 'public_office_holderGrid_notes_handler_list', $column);
GetApplication()->RegisterHTTPHandler($handler);
//
// View column for photo_link field
//
$column = new TextViewColumn('photo_link', 'Photo Link', $this->dataset);
$column->SetOrderable(true);
//.........这里部分代码省略.........