optikalefx / OpenJS-Grid

OpenJS Grid is the easiest jQuery Grid ever. With very little work you can have a data grid that can do everything from sorting and searching to complex database queries. Best of all, its open source. So you can learn how it's all done.
http://square-bracket.com/openjs
MIT License
96 stars 46 forks source link

Open JS Grid

ojg icon

Overview

Open JS Grid, The easiest data table / grid available for js and php developers. I used all of my knowledge of OOP Javascript, jQuery, mySQL and PHP to do all the work for you, as well as comment the hell out of everything.

For all the documentation and examples, see http://square-bracket.com/openjs

Current Version 2.1

Getting Started

HTML Setup

<table action="ajax.php">
    <tr>
        <th col="Username">Username</th>
        <th col="FirstName">First Name</th>
        <th col="Lastname">Last Name</th>
        <th col="Email">Email</th>
    </tr>
</table>

JS Setup

<script>
  $(function() {
    $(".users").grid();
  });
</script>

PHP Setup

<?php
  require_once("grid.php");
  $grid = new Grid("users", array(
    "save"=>true,
    "delete"=>true
  ));
?>

The philosophy

Basically, the whole idea here is that in backend coding, you have to make a ton of table displays for customers or clients. OpenJS Grid provides a super easy / powerful way to give customers access to data. I do all the database work for you, so you don't have to figure out searching and sorting, as well as give you cool stuff like events and cell types so you can customize to fit your need. And now with Stylus and Bootstrap, you can easily restyle the grid to your liking.

Once more, I believe data grids should still be written as HTML tables, with very little javascript config. So that's why the setup is an HTML table. You can also specificy column options as attributes on the <th> elements. That's so you can have dynamic grids, and less javascript config.

The Features 2.1

The Future 3.0?

Who am I?

I'm Sean Clark. I run a training youtube channel for advanced coding. That coincides with Square Bracket which is where I make demos and other training videos.

I have a blog about developer things.