Multiple datagrids Archives | phpGrid - PHP Datagrid Create PHP grids in minutes, not hours. Sat, 30 Nov 2024 00:05:16 +0000 en-US hourly 1 CodeProjecthttps://wordpress.org/?v=7.0.3 129966043 Multiple Datagrids Side by Side https://phpgrid.com/example/multiple-datagrids-side-by-side/ Tue, 09 Sep 2014 22:02:46 +0000 http://phpgrid.com/?p=2865 When having multiple datgagrids on a page, it’s common you need to change the default top to bottom layout. The following code snippet shows how to use simple CSS to change layout to side by side. Make sure to give enough width to datagrid container so that the grids won’t wrap. 12345678910111213141516171819202122232425262728293031323334353637<div id="bigcontainer">     […]

The post Multiple Datagrids Side by Side appeared first on phpGrid - PHP Datagrid.

]]>
When having multiple datgagrids on a page, it’s common you need to change the default top to bottom layout. The following code snippet shows how to use simple CSS to change layout to side by side.

Make sure to give enough width to datagrid container so that the grids won’t wrap.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<div id="bigcontainer">

    <div id="dg1">
        <?php
        $dg = new C_DataGrid("SELECT * FROM orders", "orderNumber", 'orders');
        $dg->enable_edit("FORM", "CRUD");
        $dg->display();
        ?>
    </div>

    <div id="dg2">
        <?php
        $dg2 = new C_DataGrid("select * from employees", "employeeNumber", "employees");
        $dg2->enable_edit("FORM", "CRUD");
        $dg2->display();
        ?>
    </div>


    <div id="dg3">
        <?php
        $dg3 = new C_DataGrid("select * from offices", "officeCode", "offices");
        $dg3->enable_edit("FORM", "CRUD");
        $dg3->display();
        ?>
    </div>

</div>

<style>
    div#bigcontainer{
       width: 5000px;
    }
    div#dg1, div#dg2, div#dg2, div#dg3{
       float:left;
    }
</style>

Multiple datagrids side by side live demo!

The post Multiple Datagrids Side by Side appeared first on phpGrid - PHP Datagrid.

]]>
2865
Multiple Editable Grids https://phpgrid.com/example/multiple-editable-php-datagrids/ Fri, 17 Sep 2010 04:48:10 +0000 http://64.38.236.7/?p=567 Did you know it is possible to have multiple editable grids in a single page? No need to separate your data management into multiple pages. You can now performa all your content administrative tasks in one page. Note that you can have multiple PHP grids of the same SQL table on a single page. However, […]

The post Multiple Editable Grids appeared first on phpGrid - PHP Datagrid.

]]>
Did you know it is possible to have multiple editable grids in a single page? No need to separate your data management into multiple pages. You can now performa all your content administrative tasks in one page.

Note that you can have multiple PHP grids of the same SQL table on a single page. However, you must give different SQL alias to each table.

1
2
3
// Always include namespace and conf.php on TOP of the script (only once)
use phpCtrl\C_DataGrid;
require_once("/file/path/to/conf.php");
1
2
3
4
5
6
7
8
9
10
11
12
13
14
$dg = new C_DataGrid("SELECT * FROM Orders", "orderNumber", 'Orders');
$dg->display();

$dg2 = new C_DataGrid("select * from employees", "employeeNumber", "Employees");
$dg2->display();

$dg3 = new C_DataGrid("select * from offices", "officeCode", "Offices");
$dg3->display();

$dg4 = new C_DataGrid("select * from productlines", "productLine", "ProductLines");
$dg4->display();

$dg5 = new C_DataGrid("select * from customers", "customerNumber", "Customers");
$dg5->display();

See Live Example!

The post Multiple Editable Grids appeared first on phpGrid - PHP Datagrid.

]]>
567