Excel Archives | phpGrid - PHP Datagrid Create PHP grids in minutes, not hours. Tue, 03 Dec 2024 18:30:14 +0000 en-US hourly 1 CodeProjecthttps://wordpress.org/?v=7.0.3 129966043 Excel Editing https://phpgrid.com/example/excel-editing/ Fri, 17 Nov 2017 05:40:15 +0000 https://phpgrid.com/?p=9386 Set the edit type to CELL enables datagrid to behave like an Excel spreadsheet. It is advisable to also enable keyboard navigation with enable_kb_nav(). * Use keyboard arrow keys to navigate the table cell like Excel. * Press Enter key to edit a cell. Enter again to save. * While editing, press Tab key to […]

The post Excel Editing appeared first on phpGrid - PHP Datagrid.

]]>
Set the edit type to CELL enables datagrid to behave like an Excel spreadsheet. It is advisable to also enable keyboard navigation with enable_kb_nav().

  • * Use keyboard arrow keys to navigate the table cell like Excel.
  • * Press Enter key to edit a cell. Enter again to save.
  • * While editing, press Tab key to move the next adjacent cell. Any changes are automatically saved.
1
2
3
4
5
6
7
8
9
10
11
// Always include namespace and conf.php on TOP of the script.
use phpCtrl\C_DataGrid;
require_once("/file/path/to/conf.php");  

$dg = new C_DataGrid("SELECT * FROM orders", "orderNumber", "orders");
$dg->enable_autowidth(true)->enable_autoheight(true);
$dg->set_pagesize(100); // needs to be a large number
$dg->set_scroll(true);
$dg->enable_kb_nav(true);
$dg->enable_edit('CELL');
$dg -> display();


Live Demo
!

The post Excel Editing appeared first on phpGrid - PHP Datagrid.

]]>
9386
Column Freeze https://phpgrid.com/example/column-freeze/ Sat, 20 Apr 2013 22:20:08 +0000 http://phpgrid.com/?p=2452 You can now use the set_col_frozen() method to set the column freeze method. It’s useful when working with a big table with many columns. The freezing column must start from the very left and then one by one to the right. 12345678// Always include namespace and conf.php on TOP of the script. use phpCtrl\C_DataGrid; require_once("/file/path/to/conf.php"); […]

The post Column Freeze appeared first on phpGrid - PHP Datagrid.

]]>
You can now use the set_col_frozen() method to set the column freeze method. It’s useful when working with a big table with many columns. The freezing column must start from the very left and then one by one to the right.

1
2
3
4
5
6
7
8
// Always include namespace and conf.php on TOP of the script.
use phpCtrl\C_DataGrid;
require_once("/file/path/to/conf.php");  

$dg = new C_DataGrid("SELECT * FROM orders", "orderNumber", "orders");
$dg->set_dimension(600, 400, false);
$dg->set_col_frozen('orderNumber');
$dg -> display();

Note that it is recommended to set text not to wrap with CSS “nowrap”. See http://phpgrid.uservoice.com/knowledgebase/articles/154972

See Live Example!

The post Column Freeze appeared first on phpGrid - PHP Datagrid.

]]>
2452