-
Notifications
You must be signed in to change notification settings - Fork 4
Home
Christos Pontikis edited this page May 16, 2017
·
14 revisions
php datagrid with jquery, jquery-ui and bootstrap frontend
Simple, secure, easy to use.
$a_dg_params = array(
'dg_columns' => $a_columns,
'dg_select_count_column' => 'id',
'dg_select_from_sql' => 'FROM ' . $tenant_schema . '.' . 'crm_tasks',
'dg_fixed_where' => $a_fixed_where,
'dg_fixed_bind_params' => $a_fixed_bind_params,
'dg_show_columns_switcher' => false,
'dg_show_addnew_record' => false,
'dg_rows_per_page_options' => array(10, 20, 30, 50, 100),
'dg_columns_to_display_options' => array(C_PHP_BS_GRID_COLUMNS_DEFAULT, C_PHP_BS_GRID_COLUMNS_MORE),
'dg_columns_default_icon' => 'glyphicon glyphicon-resize-full',
'dg_columns_more_icon' => 'glyphicon glyphicon-resize-small',
'dg_col_sortable_class' => 'col-sortable',
'dg_sort_asc_indicator' => '<span class="glyphicon glyphicon-chevron-up" aria-hidden="true"></span> ',
'dg_sort_desc_indicator' => '<span class="glyphicon glyphicon-chevron-down" aria-hidden="true"></span> ',
'dg_advanced_sorting_options' => array(),
'dg_allow_export_excel' => true,
'dg_export_excel_options' => array(C_PHP_BS_GRID_EXPORT_EXCEL_NO, C_PHP_BS_GRID_EXPORT_EXCEL_YES),
'dg_export_excel_basename' => 'calendar',
'dg_main_template_path' => C_CLASS_PHP_BS_GRID_TEMPLATE_PATH,
'dg_criteria_template_path' => C_PROJECT_PATH . '/app/crm/calendar/archive/criteria.php',
'dg_form_action' => urlencode($section_urls['activities_archive']),
'dg_strings' => $a_strings
);
$a_columns = array(
'column1' => array(
'header' => 'Column Header',
'display' => C_PHP_BS_GRID_COLUMNS_DEFAULT,
'th_class' => 'text-nowrap my-class',
'td_class' => 'my-class',
'select_sql' => 'columns1',
'sort_simple' => true,
// optional
'sort_simple_default' => true,
'sort_simple_default_order' => 'ASC',
),
);