Skip to content
This repository was archived by the owner on Jul 24, 2025. It is now read-only.
ElvaPublic archive

About

Tiny, grid-based data editor.

Resources

Stars

2 stars

Watchers

2 watching

Forks

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

griddler.js

Tiny, grid-based data editor in ~500 lines of pure Javascript.
No jQuery required.
https://elva.github.io/griddler.js

Quick Start

<!DOCTYPE html>
<html>
<head>
    <title>Book List</title>
    <link rel="stylesheet" type="text/css" href="griddler.css" />
</head>
<body>
    <div id="book-list"></div>

    <script src="griddler.js"></script>
    <script>

        var griddler = Griddler.create({
            containerId: 'book-list',
            columns: [
                { name: 'bookId', type: 'hidden' },
                { name: 'title',  th: 'Book' },
                { name: 'year',   th: 'Year' },
                { name: 'author', th: 'Author' }
            ],
            data: [
                { 
                    bookId: 7,
                    title: 'On the Road',
                    year: 1957,
                    author: 'Jack Kerouac'
                },
                { 
                    bookId: 8,
                    title: 'Fight Club',
                    year: 1999,
                    author: 'Chuck Palahniuk'
                },
                { 
                    bookId: 9,
                    title: 'The Dreamers',
                    year: 1988,
                    author: 'Gilbert Adair'
                }
            ]
        });


        griddler.on('update', function (rows) {
            // List of updated rows.
            console.log(rows);
        });

        griddler.on('delete', function (rows) {
            // List of deleted rows.
            console.log(rows);
        });

        griddler.on('save', function (updatedRows, deletedRows) {
            // Lists of updated and deleted rows.
            console.log(updatedRows, deletedRows);
        });
    </script>
</body>
</html>

About

Tiny, grid-based data editor.

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages