Simple PHP:DataGrid Row Demo

This demo shows the adding of new rows.


ID Title Category Author
Custom Data Can Be added using Row tags
1 Item 1 3 Dennis
2 Item 2 5 John
3 Item 3 2 Chris
4 Item 4 3 Jeremy
5 Item 5 6 Chris
6 Item 6 5 John
7 Item 7 3 Dennis
8 Item 8 7 Chris
9 Item 9 8 Dennis
10 Item 10 3 Jeremy
11 Item 11 9 Dennis
12 Item 12 3 John
13 Item 13 2 Chris
14 Item 14 1 Dennis
15 Item 15 5 John
16 Item 16 3 Jeremy
Rows Below Data As well

Source:

<?php
include ('phpdatagrid.php');

// Include Sample data
include ('sampledata.php');

// Bind data to datagrid
$_DATAGRID->bind ('demo'$data);

?>
<html>
    <head>
        <title>PHP:DataGrid - Demo 7</title>
    </head>

    <body>

    <h1>Simple PHP:DataGrid Row Demo</h1>

    <p>This demo shows the adding of new rows.</p>

    <hr />

    <php:datagrid name="demo" width="100%" AutoGenerateColumns="false" cellpadding="5" cellspacing="0" border="true">
        <Style font-family="Verdana" background-color="#eeeeee" font-size="12px" />
        <HeaderStyle Background-Color="#000" bold="true" text-color="#fff" />
        <AlternateItemStyle background-color="#fff" />

        <Column width="10%" datafield="id" readonly="true" ItemStyle-text-align="center" HeaderText="ID" />
        <Column datafield="title" HeaderText="Title" />
        <Column datafield="category" HeaderText="Category" />
        <Column width="35%" datafield="author" HeaderText="Author" />

        <Row type="before" name="rowone" Style-background-color="#fff">
            <Column for="0"><strong>Custom</strong></Column>
            <Column for="1"><strong>Data</strong></Column>
            <Column for="2"><strong>Can</strong></Column>
            <Column for="3"><strong>Be added using <code>Row</code> tags</strong></Column>
        </Row>

        <Row type="after" name="rowtwo">
            <Column for="0"><strong>Rows</strong></Column>
            <Column for="1"><strong>Below</strong></Column>
            <Column for="2"><strong>Data</strong></Column>
            <Column for="3"><strong>As well</strong></Column>
        </Row>
    </php:datagrid>

    <hr />

    <h2>Source:</h2>
    <div style="background-color: #EFEFEF;"><?php highlight_file(__FILE__); ?></div>
    
    </body>
</html>